Re: [APC-DEV] Bug #6964 apc_load_constants() weird behaviour in CLI
| From: | Brian Shire | Date: | Sun, 18 Feb 2007 03:52:33 +0000 |
| Subject: | Re: [APC-DEV] Bug #6964 apc_load_constants() weird behaviour in CLI | ||
| References: | 1 2 | Groups: | php.apc.dev |
| Request: | Send a blank email to php-apc-dev+get-57@lists.php.net to get a copy of this message | ||
On Feb 17, 2007, at 7:45 PM, Sean Coates wrote:
Brian Shire wrote:<grin>, well it *is* open source after all.Should we just update the documentation on this one to reflect reality? Seems like that's the best bet, as it'll stay BC. http://pecl.php.net/bugs/bug.php?id=6964&edit=1...Need to decide whether the documentation or code is to be fixed.I wrote this doc, so I guess it _is_ my business (-:
What's the actual issue here? that constants loaded with apc_load_constants() are persistent between requests?I believe Gopal's description on the bug page pretty much sums this up, both apc_load_constants() and apc_define_constants() register the constants so calling them serially will trigger already defined type errors. AFAIK apc_load_constants() should be called conditionally depending weather apc_define_constants() has already been called, or the code should be changed so that you always have to call apc_load_constants() even if apc_define_constants() has already been called. Per Gopal's comment, we just need to decide which change to make code or documentation. -Brian Shire shire@facebook.com shire@php.net