OS X PHP Download & Compile


/ Published in: Other
Save to your folder(s)

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


Copy this code and paste it in your HTML
  1. # you'll have to aquire a new URL here: http://us3.php.net/downloads.php when a new version of PHP comes out
  2. PHP_VERSION=5.2.13
  3. wget http://us.php.net/distributions/php-${PHP_VERSION}.tar.gz
  4. tar -xzf php-${PHP_VERSION}.tar.gz
  5. cd php-${PHP_VERSION}
  6.  
  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
  9.  
  10. # install some modules
  11. sudo port install libpng && sudo port install jpeg && sudo port install freetype && sudo port install gd2
  12.  
  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
  15.  
  16. make && sudo make install

URL: http://mabblog.com/blog/?p=291

Report this snippet


Comments

RSS Icon Subscribe to comments

You need to login to post a comment.