php.net |  support |  documentation |  report a bug |  advanced search |  search howto |  statistics |  random bug |  login
Bug #59570 spl_autoload + session_set_save_handler = crash
Submitted: 2011-01-11 04:47 UTC Modified: 2013-10-15 11:54 UTC
From: thomas dot foerster at gfk dot com Assigned:
Status: No Feedback Package: APC (PECL)
PHP Version: 5.2.13 OS: SUSE Linux Enterprise 11.1 x64
Private report: No CVE-ID: None
Have you experienced this issue?
Rate the importance of this bug to you:

 [2011-01-11 04:47 UTC] thomas dot foerster at gfk dot com
Description:
------------
When using spl_autoload_register() in combination with session_set_save_handler(), php crashes after loading the page 1-3 times. I want to implement a custom session storage class that stores its data inside the APC cache.

Disabling my autoloader will fix the crash issues but this is not an option for a bigger project depending on the autoloader.

Using single functions instead of a class for the custom session handler fixes the problem too. However I need to implement it as a class.

I've tried tons of different code-snippets, apc-settings etc. but none worked for me. 

Reproduce code:
---------------
See my test script here:

http://pastebin.com/AP0tdCP3


Expected result:
----------------
"foo" should be the output

Actual result:
--------------
php 5.2.17, apache 2.2.11 and apc 3.1.6 were compiled with "gcc -g"

# gdb /usr/local/apache/bin/httpd /tmp/core
(gdb) bt
#0  0x00007f4d6aff95b3 in zif_spl_autoload () from /usr/local/apache/modules/libphp5.so
#1  0x00007f4d756d9790 in ?? ()
#2  0x0000000000000008 in ?? ()
#3  0x00007fffd5a83830 in ?? ()
#4  0x00007f4d6b7baf10 in executor_globals () from /usr/local/apache/modules/libphp5.so
#5  0x00007fffd5a83854 in ?? ()
#6  0x00007fffd5a837e0 in ?? ()
#7  0x00007fffd5a83838 in ?? ()
#8  0x00007f4d75d39e90 in ?? ()
#9  0x0000000000000000 in ?? ()

Patches

Add a Patch

Pull Requests

Add a Pull Request

History

AllCommentsChangesGit/SVN commitsRelated reports
 [2013-06-27 22:22 UTC] yohgaki@php.net
-Status: Open +Status: Feedback
 [2013-06-27 22:22 UTC] yohgaki@php.net
Please try using this snapshot:

  http://snaps.php.net/php5.4-latest.tar.gz
 
For Windows:

  http://windows.php.net/snapshots/


 [2013-10-15 11:54 UTC] pecl-dev at lists dot php dot net
No feedback was provided. The bug is being suspended because
we assume that you are no longer experiencing the problem.
If this is not the case and you are able to provide the
information that was requested earlier, please do so and
change the status of the bug back to "Re-Opened". Thank you.
 
PHP Copyright © 2001-2021 The PHP Group
All rights reserved.
Last updated: Thu Dec 09 02:03:35 2021 UTC