php.net |  support |  documentation |  report a bug |  advanced search |  search howto |  statistics |  random bug |  login
Bug #3208 'Cannot redeclare' when function should not yet declared
Submitted: 2000-01-13 18:18 UTC Modified: 2000-06-11 20:07 UTC
From: peer at ozemail dot com dot au Assigned:
Status: Closed Package: Scripting Engine problem
PHP Version: 4.0 Beta 3 OS: Windows 2000
Private report: No CVE-ID: None
 [2000-01-13 18:18 UTC] peer at ozemail dot com dot au
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.

Patches

Add a Patch

Pull Requests

Add a Pull Request

History

AllCommentsChangesGit/SVN commitsRelated reports
 [2000-06-11 20:07 UTC] zeev at cvs dot php dot net
This should be fixed now, even though you should be warned that the ISAPI module of PHP 4.0 is still considered experimental.  If you still experience problems - you should use the CGI binary (php.exe) instead.
 
PHP Copyright © 2001-2024 The PHP Group
All rights reserved.
Last updated: Fri Apr 26 21:01:29 2024 UTC