cron job causes debug error
I have the /cgi-bin file being executed regularly as a cron job.
The script creates the sitemaps correctly but it generates a debug error every time.
Quote:
[13-May-2012 01:00:01] PHP Warning: session_start() [<a href='function.session-start'>function.session-start</a>]: Cannot send session cookie - headers already sent in /home/xxxx/public_html/tienda/includes/functions/sessions.php on line 113
[13-May-2012 01:00:01] PHP Warning: session_start() [<a href='function.session-start'>function.session-start</a>]: Cannot send session cache limiter - headers already sent in /home/xxxx/public_html/tienda/includes/functions/sessions.php on line 113
While it appears that the usual cause of such an error is a line after the closing php tag, these files don't have closing tags.
I have checked that the files are identical to the install ones, no extra spaces or lines at the end.
Any clues?
Re: cron job causes debug error
Quote:
Originally Posted by
torvista
I have the /cgi-bin file being executed regularly as a cron job.
The script creates the sitemaps correctly but it generates a debug error every time.
While it appears that the usual cause of such an error is a line after the closing php tag, these files don't have closing tags.
I have checked that the files are identical to the install ones, no extra spaces or lines at the end.
Any clues?
Check your files. You can use my script found_extra_space.
Re: cron job causes debug error
Great script!
It found half a dozen files which I corrected.
...including
/includes/templates/template_default/sitemapxml/html_header.php
which I had previously ignored due to the comment at the end.
However, removing the final line has not cured the debug error.
regards
Steve
Re: cron job causes debug error
Quote:
Originally Posted by
torvista
...including
/includes/templates/template_default/sitemapxml/html_header.php
which I had previously ignored due to the comment at the end.
However, removing the final line has not cured the debug error.
Of course, because html_header.php actually displays the information. But it happens much later start sessions.
It is strange that the error message does not indicate the place where the output header starts.
In addition, the script /cgi-bin/sitemapxml.php buffers (ob_start()) all output before starting the main wrapper index.php. This means that the presence of extra-Space should not affect the output header.
Perhaps there are some features of php-scripts run through Cron. As you run, what is written in the crown?
Show your script /cgi-bin/sitemapxml.php here.