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.

eZ debug

Timing: Jan 31 2025 08:21:44
Script start
Timing: Jan 31 2025 08:21:44
Module start 'layout'
Timing: Jan 31 2025 08:21:44
Module start 'content'
Timing: Jan 31 2025 08:21:44
Module end 'content'
Timing: Jan 31 2025 08:21:44
Script end

Main resources:

Total runtime0.0195 sec
Peak memory usage4,096.0000 KB
Database Queries3

Timing points:

CheckpointStart (sec)Duration (sec)Memory at start (KB)Memory used (KB)
Script start 0.00000.0068 588.4141151.2422
Module start 'layout' 0.00690.0039 739.656336.6953
Module start 'content' 0.01070.0068 776.351694.2188
Module end 'content' 0.01750.0019 870.570337.9922
Script end 0.0194  908.5625 

Time accumulators:

 Accumulator Duration (sec) Duration (%) Count Average (sec)
Ini load
Load cache0.002613.3761140.0002
Check MTime0.00126.1262140.0001
Mysql Total
Database connection0.00115.833310.0011
Mysqli_queries0.003919.792630.0013
Looping result0.00000.102910.0000
Template Total0.00168.110.0016
Template load0.00136.537910.0013
Template processing0.00031.515910.0003
Override
Cache load0.00094.518310.0009
General
dbfile0.002010.419080.0003
String conversion0.00000.045340.0000
Note: percentages do not add up to 100% because some accumulators overlap

Templates used to render the page:

UsageRequested templateTemplateTemplate loadedEditOverride
1print_pagelayout.tpl<No override>extension/community/design/community/templates/print_pagelayout.tplEdit templateOverride template
 Number of times templates used: 1
 Number of unique templates used: 1

Time used to render debug report: 0.0001 secs