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

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.

eZ debug

Timing: Jan 18 2025 22:31:57
Script start
Timing: Jan 18 2025 22:31:57
Module start 'content'
Timing: Jan 18 2025 22:31:58
Module end 'content'
Timing: Jan 18 2025 22:31:58
Script end

Main resources:

Total runtime0.5622 sec
Peak memory usage4,096.0000 KB
Database Queries66

Timing points:

CheckpointStart (sec)Duration (sec)Memory at start (KB)Memory used (KB)
Script start 0.00000.0065 589.7500180.8047
Module start 'content' 0.00650.5512 770.5547620.0938
Module end 'content' 0.55780.0044 1,390.648446.0234
Script end 0.5621  1,436.6719 

Time accumulators:

 Accumulator Duration (sec) Duration (%) Count Average (sec)
Ini load
Load cache0.00290.5188140.0002
Check MTime0.00120.2221140.0001
Mysql Total
Database connection0.00070.118510.0007
Mysqli_queries0.505789.9468660.0077
Looping result0.00140.2555640.0000
Template Total0.537995.720.2689
Template load0.00180.325120.0009
Template processing0.536095.340620.2680
Template load and register function0.00010.023110.0001
states
state_id_array0.00100.184110.0010
state_identifier_array0.00080.147620.0004
Override
Cache load0.00160.2900550.0000
Sytem overhead
Fetch class attribute can translate value0.00070.123430.0002
Fetch class attribute name0.00110.193780.0001
XML
Image XML parsing0.00170.297930.0006
class_abstraction
Instantiating content class attribute0.00000.0040100.0000
General
dbfile0.00120.2153320.0000
String conversion0.00000.001130.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
5content/datatype/view/ezimage.tpl<No override>extension/sevenx/design/simple/templates/content/datatype/view/ezimage.tplEdit templateOverride template
5content/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
6content/datatype/view/ezxmltags/line.tpl<No override>design/standard/templates/content/datatype/view/ezxmltags/line.tplEdit templateOverride template
1pagelayout.tpl<No override>extension/sevenx/design/simple/templates/pagelayout.tplEdit templateOverride template
 Number of times templates used: 29
 Number of unique templates used: 6

Time used to render debug report: 0.0001 secs