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

 ID:                 49867
 Comment by:         iamcraigcampbell at gmail dot com
 Reported by:        nicolas dot lepage at yahoo dot fr
 Summary:            spl_autoload crashes when called in write function
                     of custom sessionSaveHandler
 Status:             No Feedback
 Type:               Bug
 Package:            SPL related
 Operating System:   *
 PHP Version:        5.3.0
 Block user comment: N

 New Comment:

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();

}


Previous Comments:
------------------------------------------------------------------------
[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] ras...@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.

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

Hello,



Have exactly the same problem with Zend Framework + Doctrine (they both
register 

own autoloaders). So when APC is enabled - it reproduces same fatal
error. I'll 

try to gather more information about what happens little bit later.



My PHP version is 5.3.2

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


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

Reply via email to