Forums / Install & configuration / Cronjob failure

Cronjob failure

Author Message

Mark Emms

Sunday 16 December 2007 4:39:22 am

Trying to set up cronjobs to allow notification settings etc to work on eZP 4Alpha2 and not managing.

Server is running PHP 5.1.6-3.4.fc6, MySQl 5.0.27-1.fc6 and Apache 2 (in prefork mode)

When running runcronjobs.php through the PHP CLI manually from the directory with runcronjobs.php in it by typing the following at the command line:

 /usr/bin/php -C runcronjobs.php

I get the following error messages:

PHP Warning:  in_array(): Wrong datatype for second argument in /var/www/vhosts/                         example.co.uk/httpdocs/ez/kernel/classes/ezscript.php on line 1055
Error initializing script: database error: No database handler was found for ''.

the PHP Warning line repeats 5 times - looking at the code it's part of the debug functionality which is looping through an array (or so it seems to me).

I get the same messages when using the -q -s site_access_name 2>&1 as well

site.ini and cronjob.ini are pretty much as initially installed.

I'm not very experienced with CLI or cron so I may be doing something stupid.....

Wondering whether it's a bug and I need to upgrade to ezP 4.0 proper (and not sure how to do that if that's the case).

Help hugely appreciated!

Kristof Coomans

Sunday 16 December 2007 1:34:30 pm

Hi Mark

eZ Publish 4.0.0 stable was recently released, so better to use this than alpha2 in the first place. But seems like this bug will be fixed in 4.0.1: http://issues.ez.no/12204

independent eZ Publish developer and service provider | http://blog.coomanskristof.be | http://ezpedia.org

Mark Emms

Monday 17 December 2007 2:50:59 am

Many, many thanks Kristof - you may have saved me hours of work there!

Is there a way of knowing (or getting some idea of) how long it is until future releases come out?

I have a client who is very keen to have this up and running - and if I can give an indication of days/weeks/months then I can keep them happyish!

Kristof Coomans

Monday 17 December 2007 3:16:47 am

4.0.1 is expected to be there in January. In the meantime, you can use it from svn maybe?
I didn't notice the second warning you got when I was replying you the first time: "Error initializing script: database error: No database handler was found for ''. Rather strange. I would inspect your [DatabaseSettings] block in all site.ini.append(.php) setting files.

independent eZ Publish developer and service provider | http://blog.coomanskristof.be | http://ezpedia.org

Mark Emms

Monday 17 December 2007 3:38:03 am

Yes - I looked using the admin interface at site.ini and all seemed OK - will check all of them now by ftp.

Thanks

Mark Emms

Monday 17 December 2007 3:55:06 am

OK. Have had a look. Have got the following in all of them:

[DatabaseSettings]
DatabaseImplementation=ezmysql
Server=localhost
User=ezusername
Password=password
Database=databasename
Charset=
Socket=disabled

also through the admin interface I have

DatabasePluginPath default ""

All content works fine so the connection to the database must be correctly set up.

I'm totally stumped!

Have tried specifying the site access using the -s siteaccessname too but get the same result.

Mark Emms

Tuesday 18 December 2007 9:19:06 am

I've tried a number of different versions of ezscript.php from the svn (perhaps not the right one - sorry don't know my way around yet!). All give the same error message (but on different line numbers obviously).

Which version were you suggesting I tried?

Kristof Coomans

Wednesday 19 December 2007 6:31:02 am

It turned out that safe_mode was on for php cli. The INI system uses file_exists() to check if an INI file is there, but this doesn't work when safe mode is on and will return false.

independent eZ Publish developer and service provider | http://blog.coomanskristof.be | http://ezpedia.org

eZ debug

Timing: Jan 18 2025 01:11:06
Script start
Timing: Jan 18 2025 01:11:06
Module start 'content'
Timing: Jan 18 2025 01:11:07
Module end 'content'
Timing: Jan 18 2025 01:11:08
Script end

Main resources:

Total runtime1.0853 sec
Peak memory usage4,096.0000 KB
Database Queries209

Timing points:

CheckpointStart (sec)Duration (sec)Memory at start (KB)Memory used (KB)
Script start 0.00000.0094 587.7031180.8438
Module start 'content' 0.00940.9131 768.5469611.9531
Module end 'content' 0.92250.1628 1,380.5000345.6953
Script end 1.0852  1,726.1953 

Time accumulators:

 Accumulator Duration (sec) Duration (%) Count Average (sec)
Ini load
Load cache0.00480.4403210.0002
Check MTime0.00200.1830210.0001
Mysql Total
Database connection0.00110.100910.0011
Mysqli_queries0.970489.41302090.0046
Looping result0.00260.24042070.0000
Template Total1.008392.920.5041
Template load0.00260.238920.0013
Template processing1.005792.664920.5028
Template load and register function0.00010.009710.0001
states
state_id_array0.00120.106410.0012
state_identifier_array0.00080.073220.0004
Override
Cache load0.00210.1977490.0000
Sytem overhead
Fetch class attribute can translate value0.00190.175430.0006
Fetch class attribute name0.00180.1662100.0002
XML
Image XML parsing0.00120.114330.0004
class_abstraction
Instantiating content class attribute0.00000.0034160.0000
General
dbfile0.01301.1944330.0004
String conversion0.00000.000730.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
1node/view/full.tplfull/forum_topic.tplextension/sevenx/design/simple/override/templates/full/forum_topic.tplEdit templateOverride template
8content/datatype/view/ezimage.tpl<No override>extension/sevenx/design/simple/templates/content/datatype/view/ezimage.tplEdit templateOverride template
8content/datatype/view/ezxmltext.tpl<No override>extension/community_design/design/suncana/templates/content/datatype/view/ezxmltext.tplEdit templateOverride template
11content/datatype/view/ezxmltags/paragraph.tpl<No override>extension/ezwebin/design/ezwebin/templates/content/datatype/view/ezxmltags/paragraph.tplEdit templateOverride template
3content/datatype/view/ezxmltags/literal.tpl<No override>extension/community/design/standard/templates/content/datatype/view/ezxmltags/literal.tplEdit templateOverride template
1content/datatype/view/ezxmltags/line.tpl<No override>design/standard/templates/content/datatype/view/ezxmltags/line.tplEdit templateOverride template
1pagelayout.tpl<No override>extension/sevenx/design/simple/templates/pagelayout.tplEdit templateOverride template
 Number of times templates used: 33
 Number of unique templates used: 7

Time used to render debug report: 0.0001 secs