|  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
View Add Comment Developer Edit
Welcome! If you don't have a Git account, you can't do anything here.
You can add a comment by following this link or if you reported this bug, you can edit this bug over here.
Block user comment
Status: Assign to:
Bug Type:
From: chopins dot xiao at gmail dot com
New email:
PHP Version: OS:


 [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: Thu Dec 01 17:05:54 2022 UTC