Php-fpm xcache

How does one enable xcache when using php-fpm?

Many thanks.

HonDev D. wrote:

How does one enable xcache when using php-fpm?

no matter what type of php-engine you are using.
Just install xcache.

In freebsd for example xcache configuration file is installed by default
to
/usr/local/etc/php/xcache.ini and it will by automatically parsed
after php-fpm (or other kind of php) restart.
To ensure see phpinfo();

Hi thanks,

For whatever reason this file was not added to
/usr/local/etc/php/xcache.ini when I compiled xcache.

Anyway I’ve tried everything and the only thing that works is
php-fpm.conf

  <value name="php_defines">
    <value name="upload_max_filesize">4m</value>
    <value name="extension">xcache.so</value>
    <value name="xcache.shm_scheme">"mmap"</value>
    <value name="xcache.size">64M</value>
    <value name="xcache.count">1</value>
    <value name="xcache.slots">8K</value>
    <value name="xcache.ttl">3600</value>
    <value name="xcache.gc_interval">1800</value>
    <value name="xcache.var_size">16M</value>
    <value name="xcache.var_count">1</value>
    <value name="xcache.var_slots">8K</value>
    <value name="xcache.var_ttl">0</value>
    <value name="xcache.var_maxttl">0</value>
    <value name="xcache.var_gc_interval">300</value>
    <value name="xcache.mmap_path">"/dev/zero"</value>
    <value name="xcache.cacher">On</value>
    <value name="xcache.stat">On</value>
    <value name="xcache.optimizer">Off</value>
  </value>

HonDev D. wrote:

Hi thanks,

For whatever reason this file was not added to
/usr/local/etc/php/xcache.ini when I compiled xcache.

See phpinfo(); output.

There are some options like:
“Scan this dir for additional .ini files”

for me (freebsd) it is “/usr/local/etc/php”
So, any php configuration files, putted to this dir, will be parsed.

Anyway you can write some php options to php-fpm.conf too.

a) this isn’t the right list - the highload-php one is

b) i am not sure php-fpm passes through all the defines properly. try
using php.ini properly first…

This forum is not affiliated to the Ruby language, Ruby on Rails framework, nor any Ruby applications discussed here.

| Privacy Policy | Terms of Service | Remote Ruby Jobs