Forums / Install & configuration / HELP .. Cron Errors !!!

HELP .. Cron Errors !!!

Author Message

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/html
X-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 running
cd /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

Selmah Maxim

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 ...?!

Selmah Maxim

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

?!?

Tony Wood

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

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

Selmah Maxim

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.

Selmah Maxim

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.php
its work fine !

but still don`t know what the risk !

Tony Wood

Monday 20 October 2003 4:59:10 am

Selmah,

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.

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

eZ debug

Timing: Jan 18 2025 22:34:26
Script start
Timing: Jan 18 2025 22:34:26
Module start 'content'
Timing: Jan 18 2025 22:34:27
Module end 'content'
Timing: Jan 18 2025 22:34:27
Script end

Main resources:

Total runtime0.2267 sec
Peak memory usage4,096.0000 KB
Database Queries141

Timing points:

CheckpointStart (sec)Duration (sec)Memory at start (KB)Memory used (KB)
Script start 0.00000.0096 588.8281180.8359
Module start 'content' 0.00960.0086 769.6641105.8828
Module end 'content' 0.01820.2084 875.5469545.2813
Script end 0.2266  1,420.8281 

Time accumulators:

 Accumulator Duration (sec) Duration (%) Count Average (sec)
Ini load
Load cache0.00401.7627200.0002
Check MTime0.00160.7017200.0001
Mysql Total
Database connection0.00140.622110.0014
Mysqli_queries0.168974.50051410.0012
Looping result0.00160.70611390.0000
Template Total0.207991.710.2079
Template load0.00100.434510.0010
Template processing0.206991.279810.2069
Override
Cache load0.00070.300910.0007
Sytem overhead
Fetch class attribute can translate value0.00110.497610.0011
XML
Image XML parsing0.00020.107610.0002
General
dbfile0.00341.5075200.0002
String conversion0.00000.004030.0000
Note: percentages do not add up to 100% because some accumulators overlap

CSS/JS files loaded with "ezjscPacker" during request:

CacheTypePacklevelSourceFiles
CSS0extension/community/design/community/stylesheets/ext/jquery.autocomplete.css
extension/community_design/design/suncana/stylesheets/scrollbars.css
extension/community_design/design/suncana/stylesheets/tabs.css
extension/community_design/design/suncana/stylesheets/roadmap.css
extension/community_design/design/suncana/stylesheets/content.css
extension/community_design/design/suncana/stylesheets/star-rating.css
extension/community_design/design/suncana/stylesheets/syntax_and_custom_tags.css
extension/community_design/design/suncana/stylesheets/buttons.css
extension/community_design/design/suncana/stylesheets/tweetbox.css
extension/community_design/design/suncana/stylesheets/jquery.fancybox-1.3.4.css
extension/bcsmoothgallery/design/standard/stylesheets/magnific-popup.css
extension/sevenx/design/simple/stylesheets/star_rating.css
extension/sevenx/design/simple/stylesheets/libs/fontawesome/css/all.min.css
extension/sevenx/design/simple/stylesheets/main.v02.css
extension/sevenx/design/simple/stylesheets/main.v02.res.css
JS0extension/ezjscore/design/standard/lib/yui/3.17.2/build/yui/yui-min.js
extension/ezjscore/design/standard/javascript/jquery-3.7.0.min.js
extension/community_design/design/suncana/javascript/jquery.ui.core.min.js
extension/community_design/design/suncana/javascript/jquery.ui.widget.min.js
extension/community_design/design/suncana/javascript/jquery.easing.1.3.js
extension/community_design/design/suncana/javascript/jquery.ui.tabs.js
extension/community_design/design/suncana/javascript/jquery.hoverIntent.min.js
extension/community_design/design/suncana/javascript/jquery.popmenu.js
extension/community_design/design/suncana/javascript/jScrollPane.js
extension/community_design/design/suncana/javascript/jquery.mousewheel.js
extension/community_design/design/suncana/javascript/jquery.cycle.all.js
extension/sevenx/design/simple/javascript/jquery.scrollTo.js
extension/community_design/design/suncana/javascript/jquery.cookie.js
extension/community_design/design/suncana/javascript/ezstarrating_jquery.js
extension/community_design/design/suncana/javascript/jquery.initboxes.js
extension/community_design/design/suncana/javascript/app.js
extension/community_design/design/suncana/javascript/twitterwidget.js
extension/community_design/design/suncana/javascript/community.js
extension/community_design/design/suncana/javascript/roadmap.js
extension/community_design/design/suncana/javascript/ez.js
extension/community_design/design/suncana/javascript/ezshareevents.js
extension/sevenx/design/simple/javascript/main.js

Templates used to render the page:

UsageRequested templateTemplateTemplate loadedEditOverride
1pagelayout.tpl<No override>extension/sevenx/design/simple/templates/pagelayout.tplEdit templateOverride template
 Number of times templates used: 1
 Number of unique templates used: 1

Time used to render debug report: 0.0001 secs