RSS

Install PECL Memcache with LAMPP

21 Feb

PECL Memcache client of memcached distributed cache server, is a very probable candidate for high-load systems.
Typically you won’t be able to use “pecl” directly and when you try to install manually with phpize you will get an error like:

” PHP Warning: Unknown(): Unable to load dynamic library ‘/opt/lampp/lib/php/extensions/no-debug-non-zts-20020429/memcache.so’ – /opt/lampp/lib/php/extensions/no-debug-non-zts-20020429/memcache.so: undefined symbol: OnUpdateLong in Unknown on line 0″

Below is step-by-step guide of how to install a PECL extension (Memcache in this case) in the latest XAMPP:

make sure you uninstall all and any PHP installations you may have had before along with PECL and PEAR

Download and install XAMPP 1.7.1

Add /opt/lampp/bin to your PATH

Download and install XAMPP Development Package

backup /opt/lampp/include directory to /opt/lampp/include-bak. This directory

Download source distribution of the PHP corresponding to your XAMPP installation

php source distribution is /opt/lampp/include/php

Run “./configure” and “make” on that php source.

Caution: Do NOT run “make install”!!!

Download memcache-2.1.2 anywhere

# cd memcache-2.1.2

# phpize

# ./configure

# make

# make install

Edit /opt/lampp/etc/php.ini and add a line:

extension=”memcache.so”

Knowledge speaks, but wisdom listens. 😉

Advertisements
 
1 Comment

Posted by on February 21, 2010 in CentOS, Fedora, Linux, Open Source, php, Tips, Tricks, Web Application

 

Tags: , , ,

One response to “Install PECL Memcache with LAMPP

  1. sumit sood

    February 24, 2010 at 8:19 am

    Some quick suggestion

    1. We dont need to uninstall any php version.just export the path of your xampp directory,fir ex (run this command in the beginning of installation ):
    # export PATH=/opt/lampp/bin:$PATH
    After that automatically all the installations will be configure of your /opt/lampp/ Directory

    2.You need to install zlib as well in your /opt/lampp directory and then run ./configure like this:
    # ./configure –with-zlib-dir=/opt/lampp/zlib

     

Leave a Reply

Fill in your details below or click an icon to log in:

WordPress.com Logo

You are commenting using your WordPress.com account. Log Out / Change )

Twitter picture

You are commenting using your Twitter account. Log Out / Change )

Facebook photo

You are commenting using your Facebook account. Log Out / Change )

Google+ photo

You are commenting using your Google+ account. Log Out / Change )

Connecting to %s

 
%d bloggers like this: