Wednesday, August 25, 2010

Integrating XCache Into PHP5 And Lighttpd (OpenSUSE 11.2)

Follow me on Twitter
Last edited 06/29/2010

This guide explains how to integrate XCache into PHP5 and lighttpd on an OpenSUSE 11.2 system. From the XCache project page: "XCache is a fast, stable PHP opcode cacher that has been tested and is now running on production servers under high load." It's similar to other PHP opcode cachers, such as eAccelerator and APC.

I do not issue any guarantee that this will work for you!

 

1 Preliminary Note

I have tested this on an OpenSUSE 11.2 server with the IP address 192.168.0.100 where lighttpd and PHP5 are already installed and working (e.g. as shown in this tutorial: Installing Lighttpd With PHP5 And MySQL Support On OpenSUSE 11.2). I'll use lighttpd's default document root /srv/www/htdocs in this tutorial for demonstration purposes. Of course, you can use any other vhost as well, but you might have to adjust the path to the info.php file that I'm using in this tutorial.

 

2 Checking PHP5's Current State

First, before we install XCache, let's find out about our PHP5 installation. To do this, we create the file info.php in our document root /srv/www/htdocs:

vi /srv/www/htdocs/info.php

Afterwards, we call that file in a browser: http://192.168.0.100/info.php

As you see, we have PHP 5.3.2 installed...

No comments:

Post a Comment