wiki:InstallingAsPhpExtension
close Warning: Can't synchronize with repository "(default)" (Unsupported version control system "svn": libapr-1.so.0: failed to map segment from shared object: Cannot allocate memory). Look in the Trac log for more information.

Version 12 (modified by moo, 8 years ago) (diff)

--

TracNav

Installing As PHP Extension

Install into php.ini

check phpinfo() for php.ini location, supposing it's /etc/php.ini (See also: PhpIni)

# cat xcache.ini >> /etc/php.ini

(modify php.ini for your usage)
# $EDITOR /etc/php.ini

WARNING: it's >> not >

Restart php

You know how to restart php than i do. It depends on what your php-sapi is, and how you run your php.

  • lighttpd or any webserver + mod_fastcgi --> php-fastcgi: just restart php itself, not the webserver
    (in case you run php with daemontools, do)
    # svc -d php && svc -u php; echo $?
    
    (or in case you're using gentoo daemontools, do)
    # svcinit php restart
    
    (in any other case, you should know better than i do.)
    
  • any webserver + mod_php: restart the webserver. something like:
    (in case you're using apache, do)
    # /etc/init.d/apache* restart
    
    (or do)
    # /etc/init.d/httpd* restart
    
    (in any other case, you should know better than i do.)
    

Make sure XCache is working

  • if you're working with php-fcgi, simply run
    $ php-fcgi -v
    PHP 4.4.3-dev (cgi-fcgi) (built: Mar 10 2006 18:46:02)
    Copyright (c) 1997-2006 The PHP Group
    Zend Engine v1.3.0, Copyright (c) 1998-2004 Zend Technologies
        with XCache v1.0, Copyright (c) 2005-2006, by mOo
    
  • otherwise, check phpinfo():
    ......
    This program makes use of the Zend Scripting Language Engine:
    Zend Engine v1.3.0, Copyright (c) 1998-2004 Zend Technologies with XCache v1.0, Copyright (c) 2005-2006, by mOo
    .....

    xcache

    XCache Supportenabled
    Version 1.0
    Readonly Protection N/A
    Opcode Cache enabled
    Variable Cache enabled

See also: BuildingFromSource (prev), InstallAdministration (next), PHP FastCGI on Lighttpd