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

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 04:13:14
Script start
Timing: Jan 18 2025 04:13:14
Module start 'layout'
Timing: Jan 18 2025 04:13:14
Module start 'content'
Timing: Jan 18 2025 04:13:15
Module end 'content'
Timing: Jan 18 2025 04:13:15
Script end

Main resources:

Total runtime0.7505 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.0048 587.9063152.6250
Module start 'layout' 0.00480.0026 740.531339.4453
Module start 'content' 0.00740.7415 779.9766606.8750
Module end 'content' 0.74890.0016 1,386.851620.8047
Script end 0.7505  1,407.6563 

Time accumulators:

 Accumulator Duration (sec) Duration (%) Count Average (sec)
Ini load
Load cache0.00370.4926160.0002
Check MTime0.00150.2062160.0001
Mysql Total
Database connection0.00070.090110.0007
Mysqli_queries0.660688.0172720.0092
Looping result0.00140.1848700.0000
Template Total0.700693.420.3503
Template load0.00310.416020.0016
Template processing0.697592.928420.3487
Template load and register function0.00030.033710.0003
states
state_id_array0.00690.924110.0069
state_identifier_array0.00340.448220.0017
Override
Cache load0.00290.3923490.0001
Sytem overhead
Fetch class attribute can translate value0.00130.170720.0006
Fetch class attribute name0.00160.2116100.0002
XML
Image XML parsing0.00160.212420.0008
class_abstraction
Instantiating content class attribute0.00000.0057160.0000
General
dbfile0.00140.1849220.0001
String conversion0.00000.001240.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/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
1print_pagelayout.tpl<No override>extension/community/design/community/templates/print_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