Using runcronjobs.php on Server: mysql_connect ends up with "Fatal error"

Author Message

Christiane Kloss

Friday 11 February 2005 8:40:40 am

Hi all together,

I'm trying to setup runcronjobs.php.

Local everything works fine. :-))
********************************
I'm using Mac OSX with Darwin
Apache 1.3.33
PHP 4.3.6
MySQL 3.23.49

So I installed everything on a production server.
Using the browser - plain and admin access works fine.
But when it comes to run cronjobs, a fatal error occurs.
I tried to find the problem by debugging.

In "lib/ezdb/classes/ezmysqldb.php" function connect()

$connection = mysql_connect( $server, $user, $password, true );

ends up in
"Fatal error: <b>Call to undefined function: mysql_connect()</b> in /home/shopicba/www.shopidoo.com/thuernau_35/lib/ezdb/classes/ezmysqldb.php on line 123"
???? PHP forgot its mysql_connect command ????

Configuration of the Server:
MySQL 3.23.56
PHP 4.3.9-1
Apache 1.3.33 (Debian / Linux)

I'm starting runcronjobs by
cd /home/shopicba/www.shopidoo.com/thuernau_35 // change to ez dir
php -C runcronjobs.php

Does anybody has an idea how this can happen????

Ɓukasz Serwatka

Friday 11 February 2005 8:51:09 am

Hi,

Did you clear the cache after installation on production server? Try remove var/cache and var/prefix/cache.

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

Christiane Kloss

Friday 11 February 2005 9:19:00 am

Yes (its my favorite hobby).

In the meantime I, separated this code:

#!/usr/bin/env php
<?php
$server = "localhost";
$user = "www";
$password = "*****";
$connection = mysql_connect( $server, $user, $password, true );
if (!$connection) {
die('Could not connect: ' . mysql_error());}
?>

Same result: Fatal error: Call to a undefined function mysql_connect()

Kristian Hole

Sunday 13 February 2005 2:24:04 am

Hi.

Seems like your command line version interface to php is compiled without mysql-support. You either need to get a (precompiled) version with mysql-support, or recompile PHP with mysql.

Kristian

http://ez.no/ez_publish/documenta...tricks/show_which_templates_are_used
http://ez.no/doc/ez_publish/techn...te_operators/miscellaneous/attribute

Christiane Kloss

Monday 14 February 2005 4:31:39 am

Indeed: the command line interface of php was build without mysql....

Thank you very much.

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