Link to home
Start Free TrialLog in
Avatar of rootman103
rootman103

asked on

Call to undefined function: message_die() in /var/www/html/db/db.php

Hi all, I am fairly new to PHP, everyone I know that uses it says it is realy easy to do and even easier to get going, I am running Mandrake Linux 9.1 and PHP version 4.3.0, I installed php-Nuke to aid in publishing and get this error when I try to access my page, the line in that file says something about unable to connect to database, but this is what i get on my screen, Fatal error: Call to undefined function: message_die() in /var/www/html/db/db.php on line 88.

line 86-88 in the db.php file is, }
 
$db = new sql_db($dbhost, $dbuname, $dbpass, $dbname, false);
if(!$db->db_connect_id) {
    message_die(CRITICAL_ERROR, "Could not connect to the database");
}
 
how can I fix this problem?

any help I can get will be awesome! thanks in advance.

Rootman 103
ASKER CERTIFIED SOLUTION
Avatar of PHPaul
PHPaul

Link to home
membership
This solution is only available to members.
To access this solution, you must be a member of Experts Exchange.
Start Free Trial
Avatar of VGR
VGR

don't use message_dir() - I never saw it - use die(message)

$db = new sql_db($dbhost, $dbuname, $dbpass, $dbname, false);
$dbLinkID=$db->db_connect_id or die("Could not connect to the database");
Somewhere in PHP-Nuke Code there has to be code like 'function message_die (...'
where message_die is defined. I guess that it is just some kind of advanced die() function.
Simpy try to replace it by

die "Could not connect to database";

You could also try to find out where message_die is defined.
What is the include path defined as?

Does PHPNuke require an additional path?

(What exactly IS PHP Nuke?)

Richard.
PHP Nuke is a portal generating system, AFAIK

A kind of site template