php.net |  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
Votes:1
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
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:
Package:
Bug Type:
Summary:
From: public at grik dot net
New email:
PHP Version: OS:

 

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

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

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

Note, this works:

<?php
$a = new A();

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

Expected result:
----------------
OK

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

Patches

Add a Patch

Pull Requests

Add a Pull Request

History

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

http://t3.dotgnu.info/keys.pub
 
PHP Copyright © 2001-2024 The PHP Group
All rights reserved.
Last updated: Fri Apr 19 15:01:28 2024 UTC