Version 22 (modified by moo, 7 years ago) (diff)


php.ini basic knowledge

We're explaining where to put XCache settings (the php.ini), and what options can be tuned with XCache, in this page.

Locating php.ini

It is simply to locate php.ini, simply check phpinfo() from your browser. Normally it's /etc/php.ini or /usr/local/lib/php.ini /usr/lib/php.ini etc.

SAPI Specified ini

PHP will scan for SAPI specified ini first in the form of php-{$sapi}.ini, and the general php.ini later. e.g.:

cgi/etc/php-cgi.ini(if cgi is built without fcgi)
cgi-fcgi/etc/php-cgi-fcgi.ini(if cgi is built with fcgi)

It's useful if you want to load/enable XCache in cgi-fcgi, while not in cli.

Separating php.ini

It depends on you or the one who distribute php at configure time. say, if you php is configure with

$ ./configure --with-config-file-scan-dir=/etc/php/
$ make

the built php will scan /etc/php/ for *.ini, and use all of them as additions to the normal php.ini above. You may put your custom xcache.ini into that directory and it will work, but you can't separate for different sapi.

If you don't know what the directory is, check phpinfo()

INI settings for XCache

See XcacheIni