Cron Jobs not working since upgrading to


I have been having a problem since softaculous preformed the upgrade from to on my self hosted install of Invocieninja.

My Cron jobs are not running and are generating the following errors.

PHP Parse error: syntax error, unexpected ‘class’ (T_CLASS), expecting identifier (T_STRING) or variable (T_VARIABLE) or ‘{’ or ‘$’ in /home/driveshare/public_html/portal/vendor/laravel/framework/src/Illuminate/Foundation/helpers.php on line 146

I have set my PHP version in cpanel to use PHP 5.5, and I know this is working because It breaks my website that only supports PHP 5.4.

I get the same error when running the artisan ninja:send-invoices or artisan ninja:send-reminders command via SSH

My Cron jobs are set to run at 4am everyday and have not had a problem until after the upgrade.

/usr/local/cpanel/3rdparty/bin/php /home2/driveshare/public_html/portal/artisan ninja:send-invoices
/usr/local/cpanel/3rdparty/bin/php /home2/driveshare/public_html/portal/artisan ninja:send-reminders

Any Help would be greatly appreciated as I am completely lost as how I need to tackle this.

Kind Regards


In v2.5.1.x we’ve upgraded to Laravel 5.2 which requires PHP >= 5.5.9.

Thanks for your reply Hillel.

I have Changed the PHP version thourgh cpanel to 5.5 and also tried 5.6 and in desperation tried the next version available 7.0.

The same error is being generated when attempting a cron job


Can you check the CLI version of PHP by running php -v on the command line.

Thanks again for your reply Hillel.

running php -v shows PHP 5.4.31 even though I changed it through cpanel to 5.5 and 5.6.

Interesting. Looks like I will need to contact my Hosting provider.

Thanks for your help

Just an update.

The hosting provider let me know that I was using PHP the third party directory which is used for the internal applications such as phpMyAdmin, Webmail etc.

I needed to point it to /usr/local/bin/php instead of /usr/local/cpanel/3rdparty/bin/php

Thanks for your help in solving this problem Hillel.