ISPConfig and the CRON feature - Running a php file every day

Discussion in 'General' started by vaio1, Oct 27, 2009.

  1. vaio1

    vaio1 Member

    Hi guys,

    inside the "Command" field what have I write?

    If I write /var/www/web1/web/schedule.php is it correct?

    thanks
     
  2. till

    till Super Moderator Staff Member ISPConfig Developer

    To run php files, you have to use:

    /usr/bin/php /var/www/web1/web/schedule.php
     
  3. vaio1

    vaio1 Member

    can I use only the prefix: "php".

    For example: php /var/www/web1/web/schedule.php

    thanks
     
  4. till

    till Super Moderator Staff Member ISPConfig Developer

    No, you cant as cron does not know where to find the php binary then.
     
  5. vaio1

    vaio1 Member

    I get this error executing the script in my way:

    Code:
    PHP Warning: PHP Startup: imagick: Unable to initialize module
    Module compiled with module API=20050922, debug=0, thread-safety=0
    PHP compiled with module API=20060613, debug=0, thread-safety=0
    These options need to match
     in Unknown on line 0
    
     
  6. falko

    falko Super Moderator Howtoforge Staff

    Which distribution do you use? Is the php-imagick module installed?
     
  7. vaio1

    vaio1 Member

    how can I check if the php-imagick is installed?
     
  8. falko

    falko Super Moderator Howtoforge Staff

    Which distribution do you use?
     
  9. vaio1

    vaio1 Member

    CentOs 5.2
     
  10. falko

    falko Super Moderator Howtoforge Staff

    What's the output of
    Code:
    yum search imagick
    ?
     
  11. vaio1

    vaio1 Member

    Hi Falko,

    thanks for your reply. I have already installed it:

    Package php-pecl-imagick-2.2.1-3.el5.i386 already installed and latest version

    thanks
     
  12. vaio1

    vaio1 Member

    I have already reply it.

    how can I hide the response of the execution of the php file?

    Is this correct?
    /usr/bin/php /var/www/web1/web/schedule.php >/dev/null

    Thanks
     
  13. till

    till Super Moderator Staff Member ISPConfig Developer

    Yes, thats correct. It redirects the std out to /dev/null
     
  14. vaio1

    vaio1 Member

    Nothing to do!
    Every time that the cron starts I get an email with the following strings:

    Code:
    PHP Warning: PHP Startup: imagick: Unable to initialize module
    Module compiled with module API=20050922, debug=0, thread-safety=0
    PHP compiled with module API=20060613, debug=0, thread-safety=0
    These options need to match
     in Unknown on line 0
    
    any idea?
     
  15. till

    till Super Moderator Staff Member ISPConfig Developer

    The imagick module that you have installed now is not the correct one for the php version that you use. This is a general installation problem and not related to ispconfig or the cron feature.

    You should try to remove the imagick module and then install it again.
     
  16. vaio1

    vaio1 Member

    So, if the imagick problem will be solved the email message is not sent anymore?
     
  17. till

    till Super Moderator Staff Member ISPConfig Developer

    Your linux distribution (and not ispconfig) is sending you this message as the cronjob could not be executed caused by the imagick problem. So if you solve the problem, there is no error and then there is no reason for your system to send you a email.
     
  18. vaio1

    vaio1 Member

    Solved reinstalling the imagick packets by hand!
    Thanks
     

Share This Page