Compiling phpredis on Zend Server CE/OSX Lion

  1. Download phpredis source code from https://github.com/nicolasff/phpredis
    git clone git://github.com/nicolasff/phpredis.git
  2. By default, compiling PHP extension on OSX Lion will generate a 64bit binary. However, Zend Server CE only support PHP 32bit. Therefore, I must compile phpredis in 32bit architecture.
    phpize
    ./configure CFLAGS="-arch i386"
    make
  3. Verify if phpredis is 32bit (Mach-O bundle i386)
    cd ./modules
    file redis.so
  4. If so, copy redis.so to Zend Server CE’s PHP extensions folder:
    sudo cp redis.so /usr/local/zend/lib/php_extensions
  5. Restart Zend Server CE:
    sudo /usr/local/zend/bin/zendctl.sh restart-apache
Loading more posts...