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