Re: [APC-DEV] Bug #6964 apc_load_constants() weird behaviour in CLI
[email protected] (Sean Coates) Sat, 17 Feb 2007 23:10:36 -0500
| Newsgroups | php.apc.dev |
|---|---|
| Message-ID | <[email protected]> |
> 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. Thanks for clearing this up. Seems to me that I just made a mistake in the docs. I'll just fix the example and add a note to the docs that indicate that apc_define_constants() not only stores constants within APC, but also actually defines the constants in the current request. Unless anyone thinks that the behaviour should be changed (FWIW, I don't). S