|   | php.net | support | documentation | report a bug | advanced search | search howto | statistics | random bug | login | 
| 
  [2004-09-13 16:29 UTC] kj at legalizer dot dk
 Description: ------------ After installing PHP 5.0.1 (and latest CVS) I get "Cannot redeclare <functionname/classname> (previously declared in <filename>)" errors at random. Then after a few seconds a window pops up with a dllhost.exe error. Saying somthing like "Memory could not be read". And my IIS chrashes. All this do not happen every time i load the page only sometimes. This did not happen in PHP 5.0.0. Im running PHP as ISAPI. Actual result: -------------- Fatal error: Cannot redeclare db_connect() (previously declared in D:\HTDocs\BEC\includes\database.inc.php:8) in D:\HTDocs\BEC\includes\database.inc.php on line 10 PatchesPull RequestsHistoryAllCommentsChangesGit/SVN commits             | |||||||||||||||||||||||||||||||||||||
|  Copyright © 2001-2025 The PHP Group All rights reserved. | Last updated: Fri Oct 31 18:00:01 2025 UTC | 
I am brand new to PHP. Here are my particulars with this problem. I am running: Windows XP 5.1.2600 Service Pack 2 Build 2600 IIS 5.1 PHP 5.2.5 installed from php-5.2.5-Win32.zip defined to IIS using php5isapi.dll MySQL 5.0.51a Win32 phpMyAdmin 2.1.4 I built a test page that only contains phpinfo(). It loads fine. When I load phpMyAdmin, I get the login page. After supplying my user name and password, I get: Fatal error: Cannot redeclare pma_ifsetor() (previously declared in D:\My Web Sites\phpMyAdmin\libraries\core.lib.php:38) in D:\My Web Sites\phpMyAdmin\libraries\core.lib.php on line 45 Notice that the previous declaration and the current declaration are in the same file (including the same path) at different line numbers. The fact is that in this file, line 38 is the PMA_ifSetOr() function declaration, while line 45 is then end of the fPMA_ifSetOr function (i.e. the ending "}"): 38 function PMA_ifSetOr(&$var, $default = null, $type = 'similar') 39 { 40 if (! PMA_isValid($var, $type, $default)) { 41 return $default; 42 } 43 44 return $var; 45 } One other interesting observation: If I restart IIS and then press F5, the page then loads successfully. Once I get this error, pressing F5 returns the same error until I restart IIS. Then (at least every time so far), the page loads fine.