CronJob with php version 5.6
Hi,
I have set php version 5.6 in php configuration (default is 5.4)
in order to use PHP: array_filter - Manual
All ok on php site
but not in cronjob
I created a cron:
cd /home/xxxxx/public_html/backend/cronjob/; php cron.php
but it fails and returns error Warning: array_filter() expects at most 2 parameters, 3 given in.... (feature available only from php version 5.6)
I tried to force cron to use php version 5.6 with
/opt/php56/lib/php -q /home/xxxxxx/public_html/backend/cronjob/cron.php
but I get the error
/usr/local/cpanel/bin/jailshell: /opt/php56/lib/php: is a directory
how can I use php version 5.6 with cron?
-
I tried to force cron to use php version 5.6 with /opt/php56/lib/php -q /home/xxxxxx/public_html/backend/cronjob/cron.php but I get the error /usr/local/cpanel/bin/jailshell: /opt/php56/lib/php: is a directory
Hello, Please try using a command like this for your cron job if you are using EasyApache 4 with PHP 5.6 installed:/opt/cpanel/ea-php56/root/usr/bin/php-cgi /home/xxxxxx/public_html/backend/cronjob/cron.php
You can find additional discussion of this topic at: EasyApache 4 Cron Issue Thanks!0
Please sign in to leave a comment.
Comments
1 comment