php.net |  support |  documentation |  report a bug |  advanced search |  search howto |  statistics |  random bug |  login
Bug #57446 apc_store fails (returns false, doesn't update) in php CLI.
Submitted: 2006-12-19 22:25 UTC Modified: 2007-02-18 02:21 UTC
From: jfitzdela at gmail dot com Assigned:
Status: No Feedback Package: APC (PECL)
PHP Version: 5.1.2 OS: Various
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 you forgot your password, you can retrieve your password here.
Password:
Status:
Package:
Bug Type:
Summary:
From: jfitzdela at gmail dot com
New email:
PHP Version: OS:

 

 [2006-12-19 22:25 UTC] jfitzdela at gmail dot com
Description:
------------
I use php CLI very heavily for a large project. For some reason, unless I've missed something (entirely likely), apc_store fails to write the data to memory in CLI. It works beautifully elsewhere, but returns false when executed in CLI.

If there is further information I can provide, please tell me, as I need this fixed BADLY! I love APC -- it is a brilliant package -- but this would be a killer.

- John

Reproduce code:
---------------
<?
 echo apc_store("key1", "test");
?>

Expected result:
----------------
Key string "test" to be stored in memory with key "key1", return code 1/true.

Actual result:
--------------
Returns 0, data not written.

Patches

Pull Requests

History

AllCommentsChangesGit/SVN commitsRelated reports
 [2006-12-20 01:37 UTC] gopalv82 at yahoo dot com
apc.enable_cli = 1 

in your apc.ini ??
 [2006-12-20 13:10 UTC] jfitzdela at gmail dot com
Don't know about apc.ini, but it is set properly in php.ini. Should there be a separate apc.ini?

Fetching works beautifully in CLI, but store just fails. Thanks for the suggestion!
 [2006-12-22 08:57 UTC] gopalv82 at yahoo dot com
Tested with latest CVS apc + php-5.1.7-dev (Oct 23 2006) and that seems to return 1 for your test code.

Are you sure you're using APC-3.0.12p2 and that single line test case is failing ? 

I could do a rebuild with 5.1.2, if you can confirm.
 [2009-10-22 21:07 UTC] jdub at bethesignal dot org
I've done a little test case which succeeds on 3.0.19 and 
fails on 3.1.3p1 (under PHP fastcgi and CLI):

  http://www.gnome.org/~jdub/2009/apc-store-test.txt

I wonder if it's related to the following bug?

  http://pecl.php.net/bugs/bug.php?id=16814
 
PHP Copyright © 2001-2025 The PHP Group
All rights reserved.
Last updated: Sat May 10 02:01:26 2025 UTC