|  support |  documentation |  report a bug |  advanced search |  search howto |  statistics |  random bug |  login
Bug #57413 APC is incompatible with Memcache
Submitted: 2006-12-03 00:50 UTC Modified: 2007-02-24 05:59 UTC
Avg. Score:5.0 ± 0.0
Reproduced:1 of 1 (100.0%)
Same Version:0 (0.0%)
Same OS:1 (100.0%)
From: public at grik dot net Assigned:
Status: No Feedback Package: APC (PECL)
PHP Version: 5_2 CVS-2006-12-03 OS: Linux
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.
Bug Type:
From: public at grik dot net
New email:
PHP Version: OS:


 [2006-12-03 00:50 UTC] public at grik dot net
When connecting to the memcache server the variable "dissappears".

Reproduce code:
class A{
    function connect(){
        $memcache = new Memcache;
        if ( $memcache->pconnect ('','11211') ){
            return 'OK';

$a = new A();
echo $a->connect(); //it says that $a does not exist

Note, this works:

$a = new A();

class A{
    function connect(){
        $memcache = new Memcache;
        if ( $memcache->pconnect ('','11211') ){
            return 'OK';
echo $a->connect(); //everything is OK

Expected result:

Actual result:
Notice: Undefined variable: a in /www/test.php on line 12

Fatal error: Call to a member function connect() on a non-object in /www/test.php on line 12


Add a Patch

Pull Requests

Add a Pull Request


AllCommentsChangesGit/SVN commitsRelated reports
 [2006-12-05 07:13 UTC] gopalv82 at yahoo dot com
Couldn't reproduce the issue with latest APC cvs + php 5_2 CVS 2006-12-05 with memcache-2.1.0 on linux-amd64.
 [2006-12-08 08:58 UTC] grikdotnet at aim dot com
I have Fedora Core 3, 32-bit.
I can open a shell account so you can see and debug if you'd like.
 [2007-01-09 04:35 UTC] gopalv82 at yahoo dot com
Please do - my ssh pub keys are at
PHP Copyright © 2001-2022 The PHP Group
All rights reserved.
Last updated: Fri Dec 09 19:05:54 2022 UTC