php.net |  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
Welcome back! If you're the original bug submitter, here's where you can edit the bug or add additional notes.
If this is not your bug, you can add a comment by following this link.
If this is your bug, but you forgot your password, you can retrieve your password here.
Password:
Status:
Package:
Bug Type:
Summary:
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
Description:
------------
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:
---------------
<?php

class B {

	const D = 'test';

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

	public function p() {
		var_dump(self::D);
	}

}

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() {
		session_start();
	}
	public function close() {
	}

	public function read() {
	}
	public function destroy() {
	}
	public function gc() {
	}
	public function write() {
		$this->s->p();
	}
}

$obj = new A;
$obj->start();

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';

Patches

Add a Patch

Pull Requests

Add a Pull Request

History

AllCommentsChangesGit/SVN commitsRelated reports
 [2013-07-21 16:53 UTC] arpad@php.net
-Status: Open +Status: Feedback
 [2013-07-21 16:53 UTC] arpad@php.net
Please try using this snapshot:

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

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

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-2024 The PHP Group
All rights reserved.
Last updated: Thu Apr 25 19:01:33 2024 UTC