Re: [APC-DEV] Bug #6964 apc_load_constants() weird behaviour in CLI
[email protected] (Brian Shire) Sat, 17 Feb 2007 19:52:33 -0800
| Newsgroups | php.apc.dev |
|---|---|
| Message-ID | <[email protected]> |
On Feb 17, 2007, at 7:45 PM, Sean Coates wrote: > Brian Shire wrote: >> >> 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 (-: > <grin>, well it *is* open source after all. > 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 [email protected] [email protected]