• If you are still using CentOS 7.9, it's time to convert to Alma 8 with the free centos2alma tool by Plesk or Plesk Migrator. Please let us know your experiences or concerns in this thread:
    CentOS2Alma discussion

Issue Site is on php 5.6 according to WebGui, but cron runs @ 5.3.3

stoooormie

New Pleskian
Hi, so I have setup Plesk Web Admin edition on my server ( 12.0.18 Update #99 )

I have added my domain XXX.com, and under Hosting settings I have set :
PHP support ( Run PHP as FastCGI Application , PHP version 5.6.30 )

Now everything works dandily fine, but I use Blesta ( a billing portal software ), however, when I run the cron command, I get this error :
( PHP Parse error: syntax error, unexpected '[' in /var/www/vhosts/XXX.com/httpdocs/clients/config/services.php on line 3 )

After chatting with their support, they diagnosed its because my cron job uses PHP 5.3.3 which does not accept that syntax. When I use the command line PHP -i , it shows my server is still using PHP 5.3.3.

From what I understand, my server currently has 2 PHP versions from MultiPHP manager ( 5.3.3 ) & 5.6 .
I have set my domain XXX.com to use 5.6 , and I have set up a scheduled task to run, however it runs with the PHP 5.3.3.

I require some guidance from you gurus.
Thank you in advance !
 
Just use

# /opt/plesk/php/5.6/bin/php

instead of system php:

# /opt/plesk/php/5.6/bin/php -v
PHP 5.6.31 (cli) (built: Sep 1 2017 17:23:26)

# php -v
PHP 5.3.3 (cli) (built: Mar 22 2017 12:17:33)
 
Back
Top