|
|
|||||||||
|
|||||||||
|
|||||||||
| |
|||
| |||||||||
![]() |
|
|
«
Previous Thread
|
Next Thread
»
|
Thread Tools | Search this Thread | Display Modes |
|
#1
|
|||
|
|||
|
db error
Fatal error: Call to undefined function: message_die() in C:\live\html\db\db.php on line 88
I am recieveing this error...why? |
|
#2
|
|||
|
|||
|
I guess I should be more specific.
I installed Mysql and I am sure this is an authenication error but I have matched the creds in the config.php file to what I put in the mysql ini file. I dont think it iwll help but here is line 88 } $db = new sql_db($dbhost, $dbuname, $dbpass, $dbname, false); if(!$db->db_connect_id) { message_die(CRITICAL_ERROR, "Could not connect to the database"); } |
|
#3
|
|||
|
|||
|
Kip,
As far as I know, message_die() is not a valid PHP function. Is that one that you created yourself? If so, make sure you're including the file, where that function is located, in your script: ie: include("../includes/funcs.php"); <-- Where message_die() is located. Otherwise, you can make use of the die() function. HTH! PS: Welcome to DevArticles!
__________________
____________________________________________ Developer Shed Weekly Writer | DevArticles Forum Moderator Build Your Own KlipFolio Klip With PHP FrankManno.com - Under Construction Design Interactive Group - Under Construction |
|
#4
|
|||
|
|||
|
Kip,
Frankie is right... message_die is definately not an intrinsic php function. If ever you are in doubt type the following into your browser: http://www.php.net/<function_name> Where <function_name> is the name of the function in question. This will take you to the PHP online manual and language reference. You will quickly find out whether that function is valid or not... before long you will be addicted to that URL. Digging even deeper, I venture to say that you probably are CP'ing (copying and pasting) someone elses code and you most likely did not copy their custom function "message_die". You have some options here: 1. Include the file that contains the message_die() function. 2. Write your own message_die() function from scratch 3. Just use the die construct like this: Code:
die(message_die("Could not connect to the database");
__________________
__________________________________________________ _ Wil Moore III, MCP | Integrations Specialist | Senior Consultant Are You Listed...? | DigitallySmooth Inc. |
![]() |
| Viewing: Dev Articles Community Forums > Programming > General Programming Help > db error |
| Thread Tools | Search this Thread |
| Display Modes | Rate This Thread |
|
|
|
|