Posted By

iloveitaly on 05/10/10


php compile os x

Versions (?)

OS X PHP Download & Compile

 / Published in: Other


This is the most updated version of my os x php compile script

  1. # you'll have to aquire a new URL here: when a new version of PHP comes out
  2. PHP_VERSION=5.2.13
  3. wget${PHP_VERSION}.tar.gz
  4. tar -xzf php-${PHP_VERSION}.tar.gz
  5. cd php-${PHP_VERSION}
  7. # strip the 64 bit version of apache in order to eliminate compatibility issues with 32 bit PHP
  8. sudo lipo /usr/sbin/httpd -thin i386 -output /usr/sbin/httpd
  10. # install some modules
  11. sudo port install libpng && sudo port install jpeg && sudo port install freetype && sudo port install gd2
  13. # compile and install PHP
  14. ./configure --prefix=/usr --sysconfdir=/private/etc --with-libxml-dir=/opt/local --with-icu-dir=/opt/local --with-iconv=shared,/opt/local --enable-intl --with-config-file-path=/etc --mandir=/usr/share/man --infodir=/usr/share/info --with-apxs2=/usr/sbin/apxs --with-zlib-dir=/usr --with-mysql-sock=/var/mysql --with-mysqli=/usr/local/mysql/bin/mysql_config --with-pdo-dblib=/opt/local --with-mysql=/usr/local/mysql --with-pear --with-pdo-mysql=/usr/local/mysql/bin/mysql_config --enable-sockets --enable-exif --enable-wddx --enable-ftp --enable-cli --enable-mbstring --enable-mbregex --enable-sockets --with-curl --with-sqlite --enable-soap --with-libxml-dir=/usr
  16. make && sudo make install

Report this snippet  

You need to login to post a comment.