I need to set up a PHP cronjob. What are the paths to the PHP interpreter?
Learn how to set a PHP cron job and the paths to the PHP interpreter on Webuzo, cPanel/WHM, and Plesk. Find quick and effective solutions for VPS.
The PHP interpreters that can be used for creating cron jobs are located at the following paths:
In the case of the Webuzo (VPS) panel:
/usr/bin/php
/usr/local/apps/phpXX/bin/php
***XX = the PHP version, without a dot, for example php56
***The PHP version installed on Webuzo can be found by using the phpinfo() function in a PHP script.
In the case of the cPanel/WHM (VPS):
/usr/bin/php
/usr/local/bin/php
/opt/cpanel/ea-phpXX/root/usr/bin/php
***XX = the PHP version, without a dot, for example php56
In the case of the Plesk (VPS):
/usr/bin/php
/opt/plesk/php/X.X/bin/php
*** X.X = the PHP version, with a dot, for example php5.6
In the case of the cPanel/WHM (Shared):
/usr/bin/php
/usr/local/bin/php
/opt/alt/phpXX/usr/bin/php
***XX = the PHP version, without a dot, for example php56
Apart from special cases (the PHP script explicitly requires a different path than the standard one), it is recommended to use /usr/bin/php