Cron Job Reporting PHP Error


I recently moved my self-hosted installation of InvoiceNinja to new hosting.

Running InvoiceNinja v2.4.7 / PHP Version 5.7.17

I adjusted all the settings in the .env to match the new hosting environment and the site appears to be working normally.

Also setup the Cron jobs like on my old hosting as well.

0 * * * * /usr/local/bin/php /home/forgetus/public_html/orgetus_invoice/artisan ninja:send-invoices

0 * * * * /usr/local/bin/php /home/forgetus/public_html/orgetus_invoice/artisan ninja:send-reminders

But now every hour I’m getting Cron notifications that say:

Parse error: syntax error, unexpected ‘[’, expecting ‘)’ in /home/forgetus/public_html/orgetus_invoice/vendor/react/promise/src/functions.php on line 68

Any ideas how I can resolve this issue?

From the error it looks like PHP is less than 5.4, it’s possible your CLI uses a different version.

Thank you so much for the suggestion I will discuss this with my webhosting company.