From:             [EMAIL PROTECTED]
Operating system: Windows 2000
PHP version:      4.1.1
PHP Bug Type:     Session related
Bug description:  redeclare class when session_start()

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 bug report at http://bugs.php.net/?id=16249&edit=1
-- 
Fixed in CVS:        http://bugs.php.net/fix.php?id=16249&r=fixedcvs
Fixed in release:    http://bugs.php.net/fix.php?id=16249&r=alreadyfixed
Need backtrace:      http://bugs.php.net/fix.php?id=16249&r=needtrace
Try newer version:   http://bugs.php.net/fix.php?id=16249&r=oldversion
Not developer issue: http://bugs.php.net/fix.php?id=16249&r=support
Expected behavior:   http://bugs.php.net/fix.php?id=16249&r=notwrong
Not enough info:     http://bugs.php.net/fix.php?id=16249&r=notenoughinfo
Submitted twice:     http://bugs.php.net/fix.php?id=16249&r=submittedtwice

Reply via email to