Bug #49867 [NoF->Csd]: spl_autoload crashes when called in write function of custom sessionSaveHandler

From: Date: Tue, 02 Nov 2010 18:43:24 +0000
Subject: Bug #49867 [NoF->Csd]: spl_autoload crashes when called in write function of custom sessionSaveHandler
References: 1  Groups: php.bugs 
Request: Send a blank email to php-bugs+get-155715@lists.php.net to get a copy of this message
Edit report at http://bugs.php.net/bug.php?id=49867&edit=1

 ID:                 49867
 Updated by:         felipe@php.net
 Reported by:        nicolas dot lepage at yahoo dot fr
 Summary:            spl_autoload crashes when called in write function
                     of custom sessionSaveHandler
-Status:             No Feedback
+Status:             Closed
 Type:               Bug
 Package:            SPL related
 Operating System:   *
 PHP Version:        5.3.0
-Assigned To:        
+Assigned To:        felipe
 Block user comment: N

 New Comment:

This bug has been fixed in SVN.

Snapshots of the sources are packaged every three hours; this change
will be in the next snapshot. You can grab the snapshot at
http://snaps.php.net/.
 
Thank you for the report, and for helping us make PHP better.

This bug has been fixed by fixing bug #53141


Previous Comments:
------------------------------------------------------------------------
[2010-08-12 19:44:33] iamcraigcampbell at gmail dot com

Just experienced this issue after upgrading to PHP 5.3.3, APC 3.1.4 on
Debian 
GNU/Linux 4.0.

When using the session handler from an instance of a class it would give
a fatal 
error: Fatal error: Undefined class constant...

After switching to use static session handler methods there was no
longer a 
fatal error, but it caused a segfault which was traced back to 
spl_autoload_register().

Tried a bunch of stuff but was able to fix the issue by registering a
shutdown 
function similar to this:

register_shutdown_function('shutdown');

function shutdown()
{
    session_write_close();
}

------------------------------------------------------------------------
[2010-06-12 23:39:43] zapparov at member dot fsf dot org

And one more interesting thing. This Fatal error is thrown (!) after all

operations were completed - so Im receiving exactly what I was expecting
to 
receive but with Fatal Error and it's trace appended to it. o_O

------------------------------------------------------------------------
[2010-06-12 23:34:44] zapparov at member dot fsf dot org

Unfortunately not for me.
Also, by some reason this problem occurs only on some requests. I'll try
to 
prepare a simple test which will reproduce this issue soonly.

------------------------------------------------------------------------
[2010-06-12 15:48:06] rasmus@php.net

Doesn't calling session_write_close() completely solve this issue?

------------------------------------------------------------------------
[2010-06-12 12:23:24] zapparov at member dot fsf dot org

Forgot to say - error occurs wonly when APC is enabled.

------------------------------------------------------------------------


The remainder of the comments for this report are too long. To view
the rest of the comments, please view the bug report online at

    http://bugs.php.net/bug.php?id=49867


-- 
Edit this bug report at http://bugs.php.net/bug.php?id=49867&edit=1


Thread (22 messages)

« previous php.bugs (#155715) next »