phpcachingeaccelerator

eAccelerator php eaccelerator_put


i've got shared hosting with eAccelerator

> eAccelerator
> 
> eAccelerator support  enabled
> Version   0.9.6.1 Caching Enabled true
> Optimizer Enabled true Check mtime
> Enabled   true Memory Size    536,870,840
> Bytes Memory Available    365,415,144
> Bytes Memory Allocated    171,455,696
> Bytes Cached Scripts  1649 Removed
> Scripts   0
> 
> Directive Local Value Master Value
> eaccelerator.allowed_admin_path   no
> value no value
> eaccelerator.cache_dir    /tmp/eaccelerator   /tmp/eaccelerator
> eaccelerator.check_mtime  1   1
> eaccelerator.debug    0   0
> eaccelerator.enable   1   1
> eaccelerator.filter   no value    no value
> eaccelerator.log_file no value    no
> value eaccelerator.optimizer  1   1
> eaccelerator.shm_max  0   0
> eaccelerator.shm_only 1   1
> eaccelerator.shm_prune_period 0   0
> eaccelerator.shm_size 512 512
> eaccelerator.shm_ttl  0   0

but when i try to use api eaccelerator_put('zz', time()); i get error Fatal error: Call to undefined function eaccelerator_put()

what is the problem?


Solution

  • The shared memory is disabled in eAccelerator by default. You have to specifically compile it using the --with-eaccelerator-shared-memory flag. You may check which functions are enabled in eAccelerator using this code snippet:

    <?php
    print_r(get_extension_funcs('eaccelerator'));
    ?>