|
php.net | support | documentation | report a bug | advanced search | search howto | statistics | random bug | login |
PatchesPull RequestsHistoryAllCommentsChangesGit/SVN commits
[2006-11-07 16:15 UTC] gopalv82 at yahoo dot com
[2007-03-02 21:20 UTC] sean at caedmon dot net
|
|||||||||||||||||||||||||||
Copyright © 2001-2025 The PHP GroupAll rights reserved. |
Last updated: Mon Dec 15 03:00:01 2025 UTC |
Description: ------------ I am using apc_load_constants() and apc_define_constants() within CLI code. It appears that these functions behave differently in the CLI SAPI than they do in the Apache 2 SAPI, in that apc_load_constants() throws notices about constants already being defined. This does not occur in the Apache 2 SAPI. Reproduce code: --------------- <?php if( ! apc_load_constants( 'general' ) ) { $constants = array( 'HTTP_OK' => 200, 'HTTP_CREATED' => 201, 'HTTP_ACCEPTED' => 202, ); apc_define_constants( 'general', $constants ); apc_load_constants( 'general' ); } ?> Expected result: ---------------- The constants get defined and cached (this is what happens under Apache 2). Actual result: -------------- Notice: Constant HTTP_OK already defined in ... Notice: Constant HTTP_CREATED already defined in ... Notice: Constant HTTP_ACCEPTED already defined in ... These errors refer to the second apc_load_constants() line, last function call in the snippet above.