|  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
Have you experienced this issue?
Rate the importance of this bug to you:

 [2006-12-19 22:25 UTC] jfitzdela at gmail dot com
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.


Add a Patch

Pull Requests

Add a Pull Request


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):

I wonder if it's related to the following bug?
PHP Copyright © 2001-2022 The PHP Group
All rights reserved.
Last updated: Tue Dec 06 06:06:02 2022 UTC