dboettger's Blog

Installing PHP 5.3.1 under Snow Leopard 10.6.2 without ports!

Posted on: January 19, 2010

Again a quick documentation about my installation on my Macbook

curl -O ftp://ftp.cac.washington.edu/imap/imap.tar.gz
tar xvzf imap.tar.gz
cd imap-2007e
sudo mkdir -p /usr/local/imap-2007e/include /usr/local/imap-2007e/lib
sudo cp c-client/*.h /usr/local/imap-2007e/include/
sudo cp c-client/*.c /usr/local/imap-2007e/lib/
sudo cp c-client/c-client.a /usr/local/imap-2007e/lib/libc-client.a

curl -O http://heanet.dl.sourceforge.net/project/mcrypt/Libmcrypt/2.5.8/libmcrypt-2.5.8.tar.gz
curl -O http://www.ijg.org/files/jpegsrc.v8.tar.gz
curl -O http://freefr.dl.sourceforge.net/project/libpng/00-libpng-stable/1.2.42/libpng-1.2.42.tar.gz
curl -O http://de.php.net/distributions/php-5.3.1.tar.gz

tar xvzf libmcrypt-2.5.8.tar.gz
cd libmcrypt-2.5.8
sudo make install

tar xvzf jpegsrc.v8.tar.gz
cd jpeg-8
sudo make install

tar xvzf libpng-1.2.42.tar.gz
cd libpng-1.2.42
sudo make install

tar xvzf php-5.3.1.tar.gz
cd php-5.3.1
./configure --prefix=/usr --mandir=/usr/share/man --infodir=/usr/share/info --with-apxs2=/usr/sbin/apxs --sysconfdir=/private/etc --with-config-file-path=/etc --with-ldap=/usr --with-ldap-sasl=/usr --with-libxml-dir=/usr --with-kerberos=/usr --with-curl=/usr --with-zlib-dir=/usr --enable-bcmath --enable-exif --enable-exif --with-bz2=/usr --enable-ftp --with-openssl=/usr --enable-mbstring --enable-mbregex --enable-calendar --enable-sockets --with-iodbc=/usr --with-curl=/usr --sysconfdir=/private/etc --with-mysqli=mysqlnd --with-mysql=mysqlnd --with-xmlrpc --with-xsl=/usr --with-pear --with-libxml-dir=/usr --with-iconv=/usr --with-pdo-mysql=mysqlnd --with-gd --enable-sysvmsg --enable-sysvsem --enable-sysvshm --enable-shmop --with-xsl=/usr --with-iconv-dir=/usr --with-iodbc=/usr --with-snmp=/usr --with-jpeg-dir=/usr/local --with-png-dir=/usr/local --with-iconv=/usr --with-pcre-regex --with-imap=/usr/local/imap-2007e --with-imap-ssl --with-mcrypt=/usr/local --enable-soap --enable-cli --with-pear
sudo make install

sudo nano /etc/apache2/httpd.conf

Uncomment the following line:
#LoadModule php5_module libexec/apache2/libphp5.so
LoadModule php5_module libexec/apache2/libphp5.so

Restart Apache!

sudo apachectl restart


Leave a Reply

Fill in your details below or click an icon to log in:

WordPress.com Logo

You are commenting using your WordPress.com account. Log Out /  Change )

Google+ photo

You are commenting using your Google+ account. Log Out /  Change )

Twitter picture

You are commenting using your Twitter account. Log Out /  Change )

Facebook photo

You are commenting using your Facebook account. Log Out /  Change )

Connecting to %s


Error: Twitter did not respond. Please wait a few minutes and refresh this page.

%d bloggers like this: