Forums / Install & configuration / HELP .. Cron Errors !!!
Selmah Maxim
Monday 20 October 2003 1:52:47 am
Hi ...
When I put this in cron jobs : php -C /home/mysite/www/runcronjobs.php
I get those errors in my email :
----------------- Content-type: text/htmlX-Powered-By: PHP/4.3.2
<br /> <b>Warning</b>: main(lib/ezutils/classes/ezsys.php): failed to open stream: No such file or directory in <b>/home/qbbcom/public_html/lib/ezutils/classes/ezdebug.php</b> on line <b>84</b><br /> <br /> <b>Warning</b>: main(): Failed opening 'lib/ezutils/classes/ezsys.php' for inclusion (include_path='.:/usr/lib/php:/usr/local/lib/php') in <b>/home/qbbcom/public_html/lib/ezutils/classes/ezdebug.php</b> on line <b>84</b><br /> <br /> <b>Warning</b>: main(lib/ezutils/classes/ezdebug.php): failed to open stream: No such file or directory in <b>/home/qbbcom/public_html/lib/ezutils/classes/ezdebugsetting.php</b> on line <b>72</b><br /> <br /> <b>Warning</b>: main(): Failed opening 'lib/ezutils/classes/ezdebug.php' for inclusion (include_path='.:/usr/lib/php:/usr/local/lib/php') in <b>/home/qbbcom/public_html/lib/ezutils/classes/ezdebugsetting.php</b> on line <b>72</b><br /> <br /> <b>Warning</b>: main(lib/ezutils/classes/ezini.php): failed to open stream: No such file or directory in <b>/home/qbbcom/public_html/lib/ezutils/classes/ezdebugsetting.php</b> on line <b>73</b><br /> <br /> <b>Warning</b>: main(): Failed opening 'lib/ezutils/classes/ezini.php' for inclusion (include_path='.:/usr/lib/php:/usr/local/lib/php') in <b>/home/qbbcom/public_html/lib/ezutils/classes/ezdebugsetting.php</b> on line <b>73</b><br /> <br /> <b>Warning</b>: main(lib/ezutils/classes/ezini.php): failed to open stream: No such file or directory in <b>/home/qbbcom/public_html/lib/ezutils/classes/ezextension.php</b> on line <b>47</b><br /> <br /> <b>Warning</b>: main(): Failed opening 'lib/ezutils/classes/ezini.php' for inclusion (include_path='.:/usr/lib/php:/usr/local/lib/php') in <b>/home/qbbcom/public_html/lib/ezutils/classes/ezextension.php</b> on line <b>47</b><br /> <br /> <b>Warning</b>: main(lib/ezutils/classes/ezdebug.php): failed to open stream: No such file or directory in <b>/home/qbbcom/public_html/lib/ezutils/classes/ezmodule.php</b> on line <b>45</b><br /> <br /> <b>Warning</b>: main(): Failed opening 'lib/ezutils/classes/ezdebug.php' for inclusion (include_path='.:/usr/lib/php:/usr/local/lib/php') in <b>/home/qbbcom/public_html/lib/ezutils/classes/ezmodule.php</b> on line <b>45</b><br /> <br /> <b>Warning</b>: main(lib/ezutils/classes/ezmodulefeatures.php): failed to open stream: No such file or directory in <b>/home/qbbcom/public_html/lib/ezutils/classes/ezmodule.php</b> on line <b>46</b><br /> <br /> <b>Warning</b>: main(): Failed opening 'lib/ezutils/classes/ezmodulefeatures.php' for inclusion (include_path='.:/usr/lib/php:/usr/local/lib/php') in <b>/home/qbbcom/public_html/lib/ezutils/classes/ezmodule.php</b> on line <b>46</b><br /> <br /> <b>Warning</b>: loadcache(lib/ezutils/classes/ezdir.php): failed to open stream: No such file or directory in <b>/home/qbbcom/public_html/lib/ezutils/classes/ezini.php</b> on line <b>288</b><br /> <br /> <b>Warning</b>: loadcache(): Failed opening 'lib/ezutils/classes/ezdir.php' for inclusion (include_path='.:/usr/lib/php:/usr/local/lib/php') in <b>/home/qbbcom/public_html/lib/ezutils/classes/ezini.php</b> on line <b>288</b><br /> <br /> <b>Fatal error</b>: Undefined class name 'ezdir' in <b>/home/qbbcom/public_html/lib/ezutils/classes/ezini.php</b> on line<b>289</b><br />
-----------------------
What the wronge here ??
i`m using ez 3.2
thx in advance.
Tony Wood
Monday 20 October 2003 2:35:48 am
Hi,
Looks like a permissions of file location error.
Try runningcd /home/mysite/www/
Then php -C runcronjobs.php
Let me know what you get.
Tony
Tony Wood : twitter.com/tonywood Vision with Technology Experts in eZ Publish consulting & development Power to the Editor! Free eZ Training : http://www.VisionWT.com/training eZ Future Podcast : http://www.VisionWT.com/eZ-Future
Monday 20 October 2003 2:49:07 am
Hi Tony ...
But how do I do this in Crontab ?!
something like this :cd /home/mysite/www/ ; php -C runcronjobs.php
or ...?!
Monday 20 October 2003 3:14:01 am
This my cron :
*/5 * * * * php -C /home/mysite/www/runcronjobs.php
this will run runcronjobs.php each 5 minute !
should i change this to :
*/5 * * * * cd /home/mysite/www/;php -C runcronjobs.php
?!
or should i make *.sh file with this 2 line and put on crontab :
cd /home/mysite/www/php -C runcronjobs.php
?!?
Monday 20 October 2003 3:36:03 am
Selmah,
I would be careful running the cron as root, just in case.. I run
su -l --command='cd /xxx/; php -C runcronjobs.php 1>/xxx/ez_cron' xxuser
This means xxuser has only rights to the folder and not to the entire system... just in case :)
Try from the command line first then cron it...
I hope this helps
Monday 20 October 2003 3:47:47 am
Thx Tony ... But
Can you PLS give more explain about this, what the risk ?!
what the xxuser ... my user name or fake name or should i create a new user for this .... or what ?!
I`m on share host.
Monday 20 October 2003 4:08:20 am
ok ..
with :su -l --command='cd /xxx/; php -C runcronjobs.php 1>/xxx/ez_cron' xxuser
i get access error !
but with cd /xxx/; php -C runcronjobs.phpits work fine !
but still don`t know what the risk !
Monday 20 October 2003 4:59:10 am
Once you have the cron working normally then you should try and lock it down further.The risk of running a cron job as root is that someone could change or find a way of adding system commands to runcronjobs.php and these would then be run on your system as root user.
Note. The xxx was a directory where you have your project the xxuser is a user that has bash or a full shell access.