Hardware Secrets
Home | Camera | Case | CE | Cooling | CPU | Input | Memory | Mobile | Motherboard | Networking | Power | Storage | Video | Other
Content
Articles
Editorial
First Look
Gabriel’s Blog
News
Reviews
Tutorials
Main Menu
About Us
Awarded Products
Compare Prices
Datasheets
Dictionary
Download
Drivers
Facebook
Forums
Links
Manufacturer Finder
Newsletter
On The Web
RSS Feed
Test Your Skills
Twitter
Newsletter
Subscribe today!
Search



Recommended
Networking Bible
Networking Bible, by Barrie Sosinsky (Wiley), starting at $20.14
Home » Networking
How to Build a Web Server with PHP 5 and MySQL 5 Support
Author: Gabriel Torres
Type: Tutorials Last Updated: April 19, 2007
Page: 5 of 5
Real-time pricing for D Link DWA-556.
DLink D-Link DWA-556 Xtreme N PCI Express Desktop Adapter A54M552 Electronics Used and New Usually ships in 24 hours
Amazon: $58.22 TigerDirect: $69.99
CompUSA: $69.99 Buy.com: $58.82

Configuring and Installing Xcache

There are several PHP cache modules around – they help saving CPU resources from your server –, some also bringing PHP optimization, which improves PHP performance: PHP-Accelerator, Mmcache, APC and Xcache. We will show you how to configure and install Xcache, as it brings native support for PHP 5, so you won’t face any compatibility issue.

Look at http://210.51.190.228/pub/XCache/Releases/ for the latest Xcache release on the 1.2 series (1.2.0 at the time of this writing) on the tar.gz format.

The downloading, configuration and compilation sequence is the following:

cd /root
wget http://210.51.190.228/pub/XCache/Releases/xcache-1.2.0.tar.gz
tar –xvzf xcache-1.2.0.tar.gz
cd xcache-1.2.0
/usr/local/apache2/php/bin/phpize
./configure –enable-xcache –enable-xcache-optimizer –with-php-config=/usr/local/apache2/php/bin/php-config
make
make install

Please pay attention at the output to see where Xcache module was installed. In our case, it was installed under /usr/local/apache2/php/lib/php/extensions/no-debug-non-zts-20060613/.

Now edit php.ini (vi /usr/local/bin/apache2/php/php.ini) and add the following lines. Change the first one according to where xcache module was installed.

[xcache-common]
zend_extension = /usr/local/apache2/php/lib/php/extensions/no-debug-non-zts-20060613/xcache.so

; required for >=php5.1 if you turn XCache on
auto_globals_jit = Off

[xcache.admin]
xcache.admin.user = ”admin“
; paste the output of md5(“password“) below
xcache.admin.pass = ”“

[xcache]
xcache.size = 32M
xcache.count = 1
xcache.slots = 8K
xcache.mmap_path = ”/dev/zero“
xcache.cacher = On
xcache.optimizer = On

You can install a web admin interface that comes with Xcache. To do that, you need to fill the xcache.admin.pass with a password in MD5 format (click here to convert a text password into MD5) and then copy admin folder from the Xcache installation directory to a directory on your web server, for example:

cd /root/xcache-1.2.0
mv admin /www/your-website/xcache

With this Xcache admin panel will be accessible through http://www.your-website.com/xcache

Restart Apache with /usr/local/apache2/bin/apachectl restart and check again your phpinfo output, this time looking for a Xcache session (”Xcache session: Enabled“). If it is there, you will have your webserver up and running with PHP 5, MySQL 5 support and PHP cache and optimization module. If not, repeat again the procedures described on this page.

« Previous |  Page 5 of 5
Print Version | Send to Friend | Bookmark Article | Comments (7)

Related Content
  • All Opteron Models
  • All Xeon Models

  • Recommended Deal.
    ASUS RT-N16ASUS RT-N16

    ASUS RT-N16 Wireless-N 300 Maximum Performance single band Gaming Router Fast Gigabit Ethernet support USB-Hard Drive and Printer Open source DDWRT Asus 2-2548189 Electronics Gi

    Amazon: $87.71 CompUSA: $89.99
    Buy.com: $87.99 Newegg: $87.70

    RSSLatest News
    Nexus Introduces the Thrio 310 PC Case
    May 22, 2012 - 8:50 AM PST
    Corsair Upgrades GS Series Power Supplies
    May 17, 2012 - 12:49 PM PST
    New 140 mm Case Fans from Arctic
    May 17, 2012 - 12:47 PM PST
    Intel Intros New Intel Xeon Processors
    May 15, 2012 - 5:04 PM PST
    Transcend Launches mSATA SSD Drives
    May 11, 2012 - 8:56 AM PST
    NVIDIA Launches GeForce GTX 670
    May 10, 2012 - 7:44 AM PST
    .:: More News ::.




    © 2004-12, Hardware Secrets, LLC. All rights reserved.
    Advertising | Legal Information | Privacy Policy
    All times are Pacific Standard Time (PST, GMT -08:00)