Php Cron

Discussion in 'PHP' started by sam20e, Feb 18, 2013.

  1. #1
    hi..

    in 1 server this cron file works fine, but after migrating to the server the cron doesnt execute instead i received an error mail :

    <b>Warning</b>: session_start() [<a href='function.session-start'>function.session-start</a>]: Cannot send session cookie - headers already sent in <b>/home/xxx/public_html/xxr/xxx/inc/config.php</b> on line <b>2</b><br />
    <br />
    <b>Warning</b>: session_start() [<a href='function.session-start'>function.session-start</a>]: Cannot send session cache limiter - headers already sent (output started at /home/xxx/public_html/xxx/xxx/inc/config.php:2) in <b>/home/xxx/public_html/xxx/xxx/inc/config.php</b> on line <b>2</b><br />

    Any idea?

    Thanks
     
    sam20e, Feb 18, 2013 IP
  2. xtmx

    xtmx Active Member

    Messages:
    359
    Likes Received:
    12
    Best Answers:
    4
    Trophy Points:
    88
    #2
    Make sure there are no extra characters before the <?php tag.

    If that doesn't work, use the function ob_start() as the first line of PHP code.
     
    xtmx, Feb 18, 2013 IP
  3. sam20e

    sam20e Member

    Messages:
    57
    Likes Received:
    1
    Best Answers:
    0
    Trophy Points:
    45
    #3
    yes i checked, no characters infront of <?php

    why is that in another shared server it worked fine?

    my one starts with <?php include("inc/config.php");
     
    sam20e, Feb 18, 2013 IP