phpcroncpanelvbulletin

Unable to add cookies, header already sent. Error in cron job, but not when loaded in browser


I have a cron job being run:

cd /home/user/public_html/index; php -f /home/user/public_html/index/stream-cron.php

When this file is run via the cron job the output is the following:

Unable to add cookies, header already sent.<br />
File: <br />
Line: 0<br />

However if I go to this file and run it from my browser, it works fine. Does anyone know what could be causing this?


Solution

  • When including outside sources, some were sending cookies. The cron job can't accept cookies thus this error was occurring.