|
php.net | support | documentation | report a bug | advanced search | search howto | statistics | random bug | login |
PatchesPull RequestsHistoryAllCommentsChangesGit/SVN commits
[1999-05-28 12:43 UTC] rasmus at cvs dot php dot net
[1999-06-01 09:25 UTC] sklar at student dot net
[1999-06-14 11:41 UTC] sklar at student dot net
|
|||||||||||||||||||||||||||
Copyright © 2001-2025 The PHP GroupAll rights reserved. |
Last updated: Sat Nov 08 17:00:02 2025 UTC |
This bug happens sporadically. I am using the module with apache 1.3.6. It seems to happen more frequently after the child processes serve a large number of requests, but some children can serve tons of requests with no problems. The error I get is: PHP 3 Fatal error: Call to unsupported or undefined function db_write() in global.php on line 30 global.php, which is required at the top of just about every page on my site begins like this: <?php if (!isset($GLOBAL_PHP_ALREADY_INCLUDED)) { $GLOBAL_PHP_ALREADY_INCLUDED = 1; $DEBUG = 0; function db_read() { global $DATABASE_READ; mysql_connect($DATABASE_READ,"user","password"); mysql_select_db("dbname"); } function db_write() { global $DATABASE_WRITE; mysql_pconnect($DATABASE_WRITE,"user","password"); mysql_select_db("dbname"); } function db_other() { global $DATABASE_OTHER; mysql_pconnect($DATABASE_OTHER,"user","password"); mysql_select_db("dbname"); } db_write(); ----------- and the error is happening when it gets to the db_write() call. The function has to be defined at that point, since the code that defines it is just a few lines above the function call. I use these db_*() functions to switch between which database server the php script is talking to as it executes.