• 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

run PHP script on crontab

D

donaxon

Guest
I am trying to set up the crontab to automate RSS2Blog, it is a php script, Does anyone know what is the cron command to execute php scripts for a plesk 7.5 control panel?
 
Take for example what Plesk inserts in cron for it's reporting:
Code:
        17      7       *       *       *       /usr/local/psa/admin/bin/php /usr/local/psa/admin/plib/report/autoreport.php --auto daily >/dev/null 2>&1
You could also use /usr/bin/php (or whatever path to your php)
 
One note: using the PSA PHP build may yield unexpected results due to the fact that PSA has it's own version of PHP5 and that the config may be different from your main server.

I would use /usr/bin/php instead.
 
Hi,

I just upgraded by mistake to PHP5 doing a yum update, when ART made available php5, and now my cronjobs that use php are not working,

*******************************************************************

If I run my script using:
/usr/local/psa/admin/bin/php

I get the following error:
PHP Warning: PHP Startup: Unable to load dynamic library '/usr/lib/php4/mysql.so' - /usr/lib/php4/mysql.so: cannot open shared object file: No such file or directory in Unknown on line 0
PHP Warning: PHP Startup: Unable to load dynamic library '/usr/lib/php4/mysqli.so' - /usr/lib/php4/mysqli.so: cannot open shared object file: No such file or directory in Unknown on line 0

****************************************************************

and if I run my script using:
/usr/bin/php

I get the following error:
Failed loading /usr/lib/php4/php_ioncube_loader_lin_4.4.so: /usr/lib/php4/php_ioncube_loader_lin_4.4.so: undefined symbol: zend_hash_add_or_update
Failed loading /usr/lib/php4/ioncube_loader_lin_4.4.so: /usr/lib/php4/ioncube_loader_lin_4.4.so: cannot open shared object file: No such file or directory
PHP Warning: Module 'mysql' already loaded in Unknown on line 0
PHP Warning: Module 'mysqli' already loaded in Unknown on line 0
PHP Warning: PHP Startup: Unable to load dynamic library '/usr/lib/php/modules/sitebuilder.so' - /usr/lib/php/modules/sitebuilder.so: cannot open shared object file: No such file or directory in Unknown on line 0
PHP Warning: PHP Startup: Unable to load dynamic library '/usr/lib/php/modules/zip.so' - /usr/lib/php/modules/zip.so: cannot open shared object file: No such file or directory in Unknown on line 0
PHP Warning: main(../tic/system/config/configure.php): failed to open stream: No existe el fichero o el directorio in /var/www/vhosts/mydomain.es/httpdocs/reports/weekly_activity.php on line 5
PHP Warning: main(): Failed opening '../tic/system/config/configure.php' for inclusion (include_path='.:/php/includes:/var/www/vhosts/mydomain.com/httpdocs/oapps/pm/lib/jpgraph/src') in /var/www/vhosts/mydomain.es/httpdocs/reports/weekly_activity.php on line 5
PHP Warning: main(../tic/system/library/classes/dbclass.php): failed to open stream: No existe el fichero o el directorio in /var/www/vhosts/mydomain.es/httpdocs/reports/weekly_activity.php on line 6
PHP Warning: main(): Failed opening '../tic/system/library/classes/dbclass.php' for inclusion (include_path='.:/php/includes:/var/www/vhosts/mydomain.com/httpdocs/oapps/pm/lib/jpgraph/src') in /var/www/vhosts/mydomain.es/httpdocs/reports/weekly_activity.php on line 6
PHP Fatal error: Class 'dbclass' not found in /var/www/vhosts/mydomain.es/httpdocs/reports/weekly_activity.php on line 7

******************************************************************

I am using plesk 7.5.4 on Fedora Core 3, MySQL 4.1 and PHP 5.0.4.
IS there something I need to change on a php.ini file to make the first one work? which location would this ini file be in?

Thanks,

Fabrizio
 
Back
Top