Forums / General / php runcronjobs.php errors

php runcronjobs.php errors

Author Message

Carlos Revillo

Monday 28 January 2008 5:53:48 am

Hi. I need a crunjobs for aproval workflows. It seems something is not right in php settings of the machine we're uploading our site.

We have shell access, but we have no root permissions on this server.

If we do wget http://www.domain.com/runcronjobs.php, the approved items appear in contentree, but we have troubles if we do

php runcronjobs.php  frequent -s es -dall 

we get

#################################### DEBUG ####################################
Content-type: text/html

Warning: (eZMySQLDB)
MySQL extension was not found, the DB handler will not be initialized.


Total script time: 0.0255 sec

btw, my settings/siteaccess/es/site.ini.append.php looks like

[DatabaseSettings]
DatabaseImplementation=ezmysql
Server=localhost
User=db_user
Password=db_password
Database=database
Charset=
Socket=/var/lib/mysql/mysql.sock

This looks the same for administration siteaccess. i've got only these two siteaccess enabled.

Site is working perfectly, so it seems i need to do something with php config for running this cronjobs works?
thank you.

Ɓukasz Serwatka

Tuesday 29 January 2008 11:36:50 pm

Hi Carlos.

It seems that your CLI PHP does not have mysql extension enabled. You can check available modules with

$ php -m

Personal website -> http://serwatka.net
Blog (about eZ Publish) -> http://serwatka.net/blog

Gaetano Giunta

Wednesday 30 January 2008 12:51:58 am

This looks like a very common misstep (I have seen it biting lots of coders).

Maybe we should better document this - OR add a check somewhere for correct php extensions being loaded in php cli - at end of install script might be a good idea...

Principal Consultant International Business
Member of the Community Project Board

Carlos Revillo

Wednesday 30 January 2008 1:49:39 am

that was the problem. php -m doesn't show anything about mysql. i've asked my hosting provider to enable it. Thanks!.

Kristof Coomans

Wednesday 30 January 2008 4:40:25 am

imho in this case the message in the debug output was quite clear, "Warning: (eZMySQLDB) MySQL extension was not found" :)

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

Gaetano Giunta

Wednesday 30 January 2008 12:47:15 pm

The message is really very telling, but some developers have no idea that you can be using a different php.ini for cli that the one used for the sapi module, so they look at the error message and are bewildered...

Principal Consultant International Business
Member of the Community Project Board

Carlos Revillo

Wednesday 30 January 2008 1:33:03 pm

Exactly :). Also, when you pay a lot of money to a hosting provider, you think all the extensiones you have asked for are enabled...
thanks everybody for your help.