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

Powered by eZ Publish™ CMS Open Source Web Content Management. Copyright © 1999-2014 eZ Systems AS (except where otherwise noted). All rights reserved.

eZ debug

Timing: Jan 18 2025 22:25:13
Script start
Timing: Jan 18 2025 22:25:13
Module start 'layout'
Timing: Jan 18 2025 22:25:13
Module start 'content'
Timing: Jan 18 2025 22:25:13
Module end 'content'
Timing: Jan 18 2025 22:25:13
Script end

Main resources:

Total runtime0.6319 sec
Peak memory usage4,096.0000 KB
Database Queries72

Timing points:

CheckpointStart (sec)Duration (sec)Memory at start (KB)Memory used (KB)
Script start 0.00000.0075 587.9141152.6250
Module start 'layout' 0.00750.0033 740.539139.4453
Module start 'content' 0.01080.6196 779.9844623.7578
Module end 'content' 0.63040.0015 1,403.742224.1719
Script end 0.6319  1,427.9141 

Time accumulators:

 Accumulator Duration (sec) Duration (%) Count Average (sec)
Ini load
Load cache0.00370.5878160.0002
Check MTime0.00150.2436160.0001
Mysql Total
Database connection0.00150.235210.0015
Mysqli_queries0.537185.0009720.0075
Looping result0.00070.1032700.0000
Template Total0.598594.720.2992
Template load0.00220.349120.0011
Template processing0.596294.355220.2981
Template load and register function0.00030.042710.0003
states
state_id_array0.00080.124210.0008
state_identifier_array0.00150.235520.0007
Override
Cache load0.00220.34101440.0000
Sytem overhead
Fetch class attribute can translate value0.00050.075520.0002
Fetch class attribute name0.00190.302990.0002
XML
Image XML parsing0.00060.101320.0003
class_abstraction
Instantiating content class attribute0.00000.0034110.0000
General
dbfile0.00170.2731160.0001
String conversion0.00000.001440.0000
Note: percentages do not add up to 100% because some accumulators overlap

Templates used to render the page:

UsageRequested templateTemplateTemplate loadedEditOverride
1node/view/full.tplfull/forum_topic.tplextension/sevenx/design/simple/override/templates/full/forum_topic.tplEdit templateOverride template
8content/datatype/view/ezxmltext.tpl<No override>extension/community_design/design/suncana/templates/content/datatype/view/ezxmltext.tplEdit templateOverride template
18content/datatype/view/ezxmltags/paragraph.tpl<No override>extension/ezwebin/design/ezwebin/templates/content/datatype/view/ezxmltags/paragraph.tplEdit templateOverride template
10content/datatype/view/ezxmltags/line.tpl<No override>design/standard/templates/content/datatype/view/ezxmltags/line.tplEdit templateOverride template
3content/datatype/view/ezimage.tpl<No override>extension/sevenx/design/simple/templates/content/datatype/view/ezimage.tplEdit templateOverride template
1print_pagelayout.tpl<No override>extension/community/design/community/templates/print_pagelayout.tplEdit templateOverride template
 Number of times templates used: 41
 Number of unique templates used: 6

Time used to render debug report: 0.0002 secs