#16249 [Com]: redeclare class when session_start()
| From: | phpbugs at sauen dot com | Date: | Tue, 10 Jun 2003 16:37:05 +0000 |
| Subject: | #16249 [Com]: redeclare class when session_start() | ||
| References: | 1 | Groups: | php.bugs |
| Request: | Send a blank email to php-bugs+get-41621@lists.php.net to get a copy of this message | ||
ID: 16249
Comment by: phpbugs at sauen dot com
Reported By: ilker dot cetinkaya at ease dot de
Status: Closed
Bug Type: Session related
Operating System: Windows 2000
PHP Version: 4.1.1
New Comment:
This problem persists in 4.1.2 as well, although not so severe
(perhaps). Debian Woody uptodate packages of Apache 1.3.2x and PHP
4.1.2, Kernel 2.4.18 (LIDS patched). Up and running fine for 60 days,
all the sudden giving such "Cannot redeclare class.." errors on
frequent reloads, wait a minute and it works again for a while.. I have
both Apache and Apache-SSL installed, seems to be the same no matter
which I try. Stopping and starting Apache and Apache-SSL made no
difference.. Rebooting the machine did, we'll see how long it lasts
now, I have no idea if it is mod_php, apache or kernel related (or
LIDS)..
Previous Comments:
------------------------------------------------------------------------
[2002-03-25 07:41:47] derick@php.net
If it works, we close it.
Derick
------------------------------------------------------------------------
[2002-03-25 04:40:31] ilker dot cetinkaya at ease dot de
hint:
on php4.1.2 with same config as above the problem does not exist.
good work.
thanks
ilker
------------------------------------------------------------------------
[2002-03-25 03:48:40] ilker dot cetinkaya at ease dot de
first of all, i want to mention that this behaviour appeared several
times before i experienced it; please refer to
http://bugs.php.net/bug.php?id=10790
which has been set to closed (although nothing was fixed on it).
what i want to report you as a definitive bug is reproduceable with a
simple script:
<?php
class tester {
}
$t = new tester();
session_start();
?>
on first hit, i see following output:
Warning: open(/tmp\sess_62fb47f4ea53d0ee595c5c7ebce98559, O_RDWR)
failed: No such file or directory (2) in C:\test_bug.php on line 8
this is correct because default session provider in php.ini is file and
my tmp directory doesn't have sufficient permissions.
hittig the script again produces this:
Fatal error: Cannot redeclare class tester in C:\test_bug.php on line
3
this is totally wrong. i do not redeclare anything on this script. it
is the very first coding line which this fatal error references.
if you hit the page more often you'll see the fatal error every 2nd
hit. this behaviour has been also complained in bug id 10790.
but i guess sniper didn't see it serious enough to make some heavy
reproducement tests.
the reason why this is a session related bug is because of
session_start() function call.
if you leave out session_start(), everything works fine.
i want to empasize once more that i could reproduce the bug on several
boxes running php4.1.1 on w2k/iis5.
here's my config:
windows 2000 (pro & server), sp2
iis5 running php_isapi.dll
extensions oci, xslt, gd, dom
php 4.1.1 isapi enabled
hth
ilker
------------------------------------------------------------------------
--
Edit this bug report at http://bugs.php.net/?id=16249&edit=1