PHP 4.0 Bug #3208: 'Cannot redeclare' when function should not yet declared

From: Date: Thu, 13 Jan 2000 23:18:11 +0000
Subject: PHP 4.0 Bug #3208: 'Cannot redeclare' when function should not yet declared
Groups: php.dev 
Request: Send a blank email to php-dev+get-14602@lists.php.net to get a copy of this message
From: peer@ozemail.com.au Operating system: Windows 2000 PHP version: 4.0 Beta 3 PHP Bug Type: Scripting Engine problem Bug description: 'Cannot redeclare' when function should not yet declared Using IIS 5. I am calling a global.php3 file from every script (only once per script, I've double checked that), but even when I am only calling them locally (ie: I am the only user attempting to access it) I get this error. Fatal error: Cannot redeclare odbc2ctime() in global_stuff.php3 on line 3 It seems that it is retaining the old function across script calls. This only happens every second time however, because if I put an if (!function_exists("odbc2ctime")) in, I don't get the error, but it falls back to the old function (a debug function with unwanted output). For example, if I first access the page it would be fine. If I then re-load it, it will complain that the function already exists and use whatever function was declared the very first time. This happens with all the functions I am trying to declare. Also, if I shift my code from my development server (php4b3) to the production server (php3.0.11) the code runs fine.

« previous php.dev (#14602) next »