• Debian 11 is approaching its end-of-life (vendor EOL date - August 31, 2026). Plesk Obsidian 18.0.80 will be the last release to support it.
    If you are running Plesk Obsidian on Debian 11, we recommend you upgrade those servers to Debian 12 using our dist-upgrade tool.
  • We plan to deprecate and remove the support for XML RPC protocol versions earlier than 1.6.9.1 in Plesk Obsidian 18.0.82. We strongly recommend that you update all existing integrations using earlier versions of the XML RPC protocol to comply with the version 1.6.9.1 specification.

PHP scripts not running even as root

mrk

New Pleskian
Hi guys I tried to setup a cronjob to run a php script.
something simple like this:

php /var/www/vhosts/onlinehome-server.info/mydomain.co.uk/script.php

didn't worked. So I used the terminal as root and I noticed that php is not running script not even as root.

not even commands like php -v works.
I don't get any error back.

any help?

plesk version 12.0

thanks
 
Yes at first I just click on scheduled tasks. Then I realise I can go to server --> scheduled tasks and there I can choose the user. Issue solved wasn't related to the cronjob. Time was different on virtuozzo plesk and my CRM.
 
I'm doing it this way:

- First change the shell for cronjobs:

/usr/local/psa/bin/server_pref -u -crontab-secure-shell "/bin/sh"

- Then setup the cronjob in the panel, respecting the php-settings of the customer (customer panel view)

%php_binary% -c %path_to_customer_php.ini% %path_to_php_file%

E.g. (using php 5.5 provided by plesk)

/opt/plesk/php/5.5/bin/php -c /var/www/vhosts/system/example.com/etc/php.ini /var/www/vhosts/example.com/httpdocs/cron.php

Please keep in mind that if you change the php-version for that customer you have to alter the settings for the cronjob to use the right php version.
 
thanks Oliver
I'm doing it this way:

- First change the shell for cronjobs:

/usr/local/psa/bin/server_pref -u -crontab-secure-shell "/bin/sh"

- Then setup the cronjob in the panel, respecting the php-settings of the customer (customer panel view)

%php_binary% -c %path_to_customer_php.ini% %path_to_php_file%

E.g. (using php 5.5 provided by plesk)

/opt/plesk/php/5.5/bin/php -c /var/www/vhosts/system/example.com/etc/php.ini /var/www/vhosts/example.com/httpdocs/cron.php

Please keep in mind that if you change the php-version for that customer you have to alter the settings for the cronjob to use the right php version.
 
Back
Top