|  support |  documentation |  report a bug |  advanced search |  search howto |  statistics |  random bug |  login
Bug #1465 a user-defined function reported as "unsupported or undefined"
Submitted: 1999-05-28 12:40 UTC Modified: 1999-06-14 11:41 UTC
From: sklar at student dot net Assigned:
Status: Closed Package: Parser error
PHP Version: 3.0.8 OS: Linux 2.0.35
Private report: No CVE-ID: None
View Add Comment Developer Edit
Anyone can comment on a bug. Have a simpler test case? Does it work for you on a different platform? Let us know!
Just going to say 'Me too!'? Don't clutter the database with that please !
Your email address:
Solve the problem:
1 + 12 = ?
Subscribe to this entry?

 [1999-05-28 12:40 UTC] sklar at student dot net
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:


  $DEBUG = 0;
  function db_read() {
    global $DATABASE_READ;

  function db_write() {
    global $DATABASE_WRITE;

  function db_other() {
    global $DATABASE_OTHER;



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. 


Add a Patch

Pull Requests

Add a Pull Request


AllCommentsChangesGit/SVN commitsRelated reports
 [1999-05-28 12:43 UTC] rasmus at cvs dot php dot net
This bug was fixed in 3.0.8
 [1999-06-01 09:25 UTC] sklar at student dot net
This still happens after upgrading to 3.0.8
 [1999-06-14 11:41 UTC] sklar at student dot net
This went away after upgrading to the CVS version as of 11:47AM EDT 3 June 1999 and stayed away with the 3.0.9 release. 

What was causing the problem?

PHP Copyright © 2001-2024 The PHP Group
All rights reserved.
Last updated: Sun Mar 03 13:01:28 2024 UTC