|  support |  documentation |  report a bug |  advanced search |  search howto |  statistics |  random bug |  login
Bug #65276 APC conflict with PHP Session handler
Submitted: 2013-07-17 05:57 UTC Modified: 2013-10-15 11:54 UTC
From: chopins dot xiao at gmail dot com Assigned:
Status: No Feedback Package: APC (PECL)
PHP Version: 5.4.17 OS: Fedora 18 x86_64
Private report: No CVE-ID: None
Have you experienced this issue?
Rate the importance of this bug to you:

 [2013-07-17 05:57 UTC] chopins dot xiao at gmail dot com
if class A be registered session handler , and the session handler class A is invoked other class B, and the class B has static property, when be invoked method of class B  that used the static property, class not defined error be report

Test script:

class B {

	const D = 'test';

	private $a = 'my test';
	static $s = 'my static';

	public function p() {


class A {
	const B = 3;
	var $s = null;
	public function __construct() {
		session_set_save_handler(array($this, 'open'), array($this, 'close'), array($this, 'read'), array($this, 'write'), array($this, 'destroy'), array($this, 'gc'));
	public function open() {
		$this->s = new B;
	public function start() {
	public function close() {

	public function read() {
	public function destroy() {
	public function gc() {
	public function write() {

$obj = new A;

Expected result:
above code not var_dump string after be the second executed
report self::D undefined and B::$s is same

Actual result:
var_dump self::D is "test", and B::$s is  'my static';


Add a Patch

Pull Requests

Add a Pull Request


AllCommentsChangesGit/SVN commitsRelated reports
 [2013-07-21 16:53 UTC]
-Status: Open +Status: Feedback
 [2013-07-21 16:53 UTC]
Please try using this snapshot:
For Windows:

Can't reproduce with PHP 5.4.18-dev and APC 3.1.13
 [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-2022 The PHP Group
All rights reserved.
Last updated: Sun Aug 14 03:05:46 2022 UTC