Archive for the tag 'extension'

SBDavid

PHP Memcache Extension with cpanel

PHP Memcache Extension with cpanel

Download the latest stable version of memcache from http://pecl.php.net/package/memcache

Download and Install

wget http://pecl.php.net/get/memcache-2.2.5.tgz
tar xvf memcache-2.2.5.tgz
cd memcache-2.2.5
phpize
./configure && make && make install

Update php.ini Configuration

Create an empty file called test.php and place this in it the php info.

Determine what php.ini file is configured.

root@host [~/php]# php -f test.php | grep “Loaded Configuration File”
Loaded Configuration File => /usr/local/lib/php.ini
SBDavid

PECL upload progress extension

PECL upload progress extension

Summary An extension to track progress of a file upload.

Download from – http://pecl.php.net/package/uploadprogress

http://pecl.php.net/get/uploadprogress-1.0.1.tgz

Extract the uploadprogress-1.0.1.tgz archive

$ phpize
$ ./configure
$ make
$ sudo make install

Add the extension to php.ini by adding this line extension=uploadprogress.so

Restart apache

/etc/init.d/httpd restart
SBDavid

How to enable runkit PHP extension

How to enable runkit PHP extension

Installing runkit PHP extension.

#cd /usr/local/src
#wget http://pecl.php.net/get/runkit-0.9.tgz
#tar -zxvf runkit-0.9.tgz
#cd runkit-0.9
#phpize
#./configure
#make

After running the make command you will get the following error.

/usr/local/src/runkit-0.9/runkit_import.c: In function ‘php_runkit_import_class_props’:
/usr/local/src/runkit-0.9/runkit_import.c:230: warning: passing argument 2 of
‘zend_unmangle_property_name’ makes integer from pointer without a cast
/usr/local/src/runkit-0.9/runkit_import.c:230: error: too few arguments to function
‘zend_unmangle_property_name’ make: *** [runkit_import.lo] Error 1

Fix is as follows

Edit the file /usr/local/src/runkit-0.9/runkit_import.c and change the following line
zend_unmangle_property_name(key, &cname, &pname);

To:

zend_unmangle_property_name(key, key_len, &cname, &pname);

Again continue with the installation steps.

#cd /usr/local/src/runkit-0.9
#make
#make install

Edit the loaded PHP configuration file ( here /usr/local/lib/php.ini ) and add the following line.

extension=runkit.so

You can verify the runkit extension by

root@host[/usr/local/src/runkit-0.9]# php -i | grep -i runkit
runkit
runkit support => enabled