cancel
Showing results for 
Search instead for 
Did you mean: 

PHP Parse Error when setting up crontab job

SOLVED

PHP Parse Error when setting up crontab job

I created crontab as explained in the documentation, but it doesn't work.

I tried to run the commands manually and here is what I get:

 

/usr/bin/php /var/www/admin/www/<website>/update/cron.php
PHP Fatal error:  Can't use method return value in write context in /var/www/admin/www/<website>/update/cron.php on line 57
/usr/bin/php /var/www/admin/www/<website>/bin/magento setup:cron:run

PHP Parse error:  syntax error, unexpected 'class' (T_CLASS), expecting identifier (T_STRING) or variable (T_VARIABLE) or '{' or '$' in /var/www/admin/www/<website>/vendor/magento/framework/App/Bootstrap.php on line 411

 

Magento version: Magento-CE-2.1.2-2016-10-11-11-16-47

PHP Version: 5.6.14

1 ACCEPTED SOLUTION

Accepted Solutions

Re: PHP Parse Error when setting up crontab job

PHP CLI was actually 5.4. So fixed it myself.

View solution in original post

2 REPLIES 2

Re: PHP Parse Error when setting up crontab job

PHP CLI was actually 5.4. So fixed it myself.

Re: PHP Parse Error when setting up crontab job

Getting same issue what have to do?