1

How to install igbinary serializer for PHP

Posted December 13th, 2011 in Razno, Zanimivosti by Metod

This is few simple step tutorial on how to install igbinary for PHP when you have multiple versions of PHP installed.

First off, you have to use proper binary versions of the PHP version you wish to install the extension to.

1. Clone the source:

$ git clone https://github.com/phadej/igbinary

2. Run phpize. Now if you don’t have the proper phpize binary in the global configuration, then just use the full path to it. I have the php version 5.4.4 installed with phpfarm, so I will use that phpize.

$ cd igbinary
$ /usr/local/php/inst/php-5.4.4/bin/phpize

3. Configure it. Make sure you put the full path to your php-config, otherwise it will not work!

$ ./configure CFLAGS="-O2 -g" --enable-igbinary --with-php-config=/usr/local/php/inst/php-5.4.4/bin/php-config

4. Compile and install

$ make
# make install

5. Enable and configure it in your php.ini

extension=igbinary.so
session.serialize_handler=igbinary
igbinary.compact_strings=On
apc.serializer=igbinary ; only if you want apc to use igbinary

6. Restart apache (assuming you run apache).

And you should see igbinary support in your phpinfo().

Post updated on 15th June, 2012 to reflect latest changes.

One Response so far.

  1. […] How to install igbinary serializer for PHP […]