| 
        php.net | support | documentation | report a bug | advanced search | search howto | statistics | random bug | login | 
 PatchesPull RequestsHistoryAllCommentsChangesGit/SVN commits             
             [2006-08-21 15:50 UTC] gopalv82 at yahoo dot com
  | 
    |||||||||||||||||||||||||||
            
                 
                Copyright © 2001-2025 The PHP GroupAll rights reserved.  | 
        Last updated: Tue Nov 04 14:00:01 2025 UTC | 
Description: ------------ apc_load_constants() always fail and constants are not being defined. I've confirmed the data being saved by apc_define_constants() using apc.php, a script provided with the APC PECL package which shows user cache entries. However, the data ("constants") are not being loaded, not even accessed (apc.php reports "Num Hits: 0 (0.00%)") ___________________________________________ Versions: APC 3.0.10 (r3.84) PHP 5.1.4-0.1 PHP API 20041225 PHP Extension 20050922 Zend Extension 220051025 ___________________________________________ APC runtime settings: apc.cache_by_default On apc.enable_cli Off apc.enabled On apc.file_update_protection 2 apc.filters (no value) apc.gc_ttl 3600 apc.max_file_size 1M apc.mmap_file_mask (no value) apc.num_files_hint 1000 apc.optimization Off apc.shm_segments 1 apc.shm_size 128 apc.slam_defense Off apc.stat On apc.ttl 0 apc.user_entries_hint 100 apc.user_ttl 0 Reproduce code: --------------- <? var_dump(apc_load_constants('strings')); if(!defined('HELLO')) { echo '_Not Defined_'; $constants = array( 'HELLO' => 'Hej', ); apc_define_constants('strings', $constants); } echo HELLO; ?> Expected result: ---------------- First request: bool(false) _Not Defined_ Hej Following requests: bool(true) Hej Actual result: -------------- First request: bool(false) _Not Defined_ Hej Following requests: bool(false) _Not Defined_ Hej