Re: [APC-DEV] Bug #6964 apc_load_constants() weird behaviour in CLI

From: Date: Sun, 18 Feb 2007 04:10:36 +0000
Subject: Re: [APC-DEV] Bug #6964 apc_load_constants() weird behaviour in CLI
References: 1 2 3  Groups: php.apc.dev 
Request: Send a blank email to php-apc-dev+get-58@lists.php.net to get a copy of this message
> 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

« previous php.apc.dev (#58) next »