After upgrading Joomla to 3.8.1 the cron job stopped working as reported here. I have applied the update the Joomla.php file as suggested in the answers. This gets rid of the original error. However now I am getting this error:
PHP Notice: Constant JPATH_ISWIN already defined in /home/fava/public_html/libraries/import.legacy.php on line 64
Notice: Constant JPATH_ISWIN already defined in /home/fava/public_html/libraries/import.legacy.php on line 64
PHP Notice: Constant JPATH_ISMAC already defined in /home/fava/public_html/libraries/import.legacy.php on line 65
Notice: Constant JPATH_ISMAC already defined in /home/fava/public_html/libraries/import.legacy.php on line 65
PHP Notice: Constant JROUTER_MODE_RAW already defined in /home/fava/public_html/libraries/import.legacy.php on line 72
Notice: Constant JROUTER_MODE_RAW already defined in /home/fava/public_html/libraries/import.legacy.php on line 72
PHP Notice: Constant JROUTER_MODE_SEF already defined in /home/fava/public_html/libraries/import.legacy.php on line 79
Notice: Constant JROUTER_MODE_SEF already defined in /home/fava/public_html/libraries/import.legacy.php on line 79
PHP Notice: Constant JROUTER_MODE_RAW already defined in /home/fava/public_html/libraries/import.php on line 60
Notice: Constant JROUTER_MODE_RAW already defined in /home/fava/public_html/libraries/import.php on line 60
PHP Notice: Constant JROUTER_MODE_SEF already defined in /home/fava/public_html/libraries/import.php on line 67
Notice: Constant JROUTER_MODE_SEF already defined in /home/fava/public_html/libraries/import.php on line 67
Error displaying the error page: Application Instantiation Error: Failed to start the session because headers have already been sent by "/home/fava/public_html/libraries/import.legacy.php" at line 64.
I have tried manually clearing the Joomla session table but no luck. I have also update CiviCRM to 4.7.27 and applied the patches as mentioned here but the same error is still occurring.
cron.php
, onlycli.php
. Your output looks as though you are using cron.php; as a workaround you could try having the cron job executephp /path/to/civicrm/bin/cli.php -s site -u user -p password -e Job -a execute
Note: I am also getting the PHP notices for constant already defined but they do not stop the job running via cli.php.