1. Please take a little time for this simple survey! Thank you for participating!
    Dismiss Notice
  2. Dear Pleskians, please read this carefully! New attachments and other rules Thank you!
    Dismiss Notice
  3. Dear Pleskians, I really hope that you will share your opinion in this Special topic for chatter about Plesk in the Clouds. Thank you!
    Dismiss Notice

run PHP script on crontab

Discussion in 'Plesk for Linux - 8.x and Older' started by donaxon, Jun 21, 2006.

  1. donaxon

    donaxon Guest

    0
     
    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?
     
  2. jamesyeeoc

    jamesyeeoc Guest

    0
     
    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)
     
  3. Highland

    Highland Guest

    0
     
    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.
     
  4. fbartolini

    fbartolini Guest

    0
     
    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
     
Loading...