PHP 64 bit libraries for Mac OS X Leopard
Sunday, 12 October 2008 09:00

Latest Apple Mac OS X Leopard 10.5.5 has PHP 5.2.6 and Apache 2.2.8 builtin, so you could start to develop web projects on your computer right out of the box. Unfortunately, PHP has been compiled without useful extensions such GD Library, PDO_MySQL, etc. I’ve compiled them by myself (except ionCube) with x86_64 superset instruction support only; I share them with you for a faster setup of PHP development environment on your Mac.

If your PHP is still not enabled on Leopard, open the file /etc/apache2/httpd.conf and uncomment line 114:

LoadModule php5_module libexec/apache2/libphp5.so

PHP extensions must be placed in the folder specified in /etc/php.ini.

; Directory in which the loadable extensions (modules) reside.
extension_dir = "/usr/lib/php/extensions/no-debug-non-zts-20060613"

MySQL DBMS isn’t installed by default on Mac OS X Leopard. If you need it, it’s quietly easy to install on Leopard: download MySQL 5.1 for Mac OS X 10.5 (x86_64), launch its setup wizard and edit php.ini to connect through the right mysql socket:

 
[MySQL]
; Default socket name for local MySQL connects.  If empty, uses the built-in
; MySQL defaults.
mysql.default_socket = /tmp/mysql.sock
 
[MySQLi]
; Default socket name for local MySQL connects.  If empty, uses the built-in
; MySQL defaults.
mysqli.default_socket = /tmp/mysql.sock
 

A web-server restart is required in order to apply any httpd.conf or php.ini changes. All extension files need to be executable by apache's user.

 

bzip2

bz2.so (25KB)
[SHA-1 = 23c6ab73055f639ae16d7342846c657aa13cd02f]

bzip2 is a freely available, patent free, high-quality data compressor. It typically compresses files to within 10% to 15% of the best available techniques (the PPM family of statistical compressors), whilst being around twice as fast at compression and six times faster at decompression. After you have copied the extension file into right folder, add the following line to your php.ini:

extension = bz2.so

 

ionCube loader

ioncube_loader_dar_5.2.so (1.1MB)
[SHA-1 = 0088db3022fb1e7c74e0faef2e88fb5a2a6dbb75]

If you need support to ionCube encoded php files, you can download and copy this extension in the folder /usr/lib/php/extensions/no-debug-non-zts-20060613. This extension has been picked from the package downloadable from ionCube’s web site. I’m sharing it because there’s a lot of confusion on its use...hope to save you some googling! Add the following lines to your php.ini file:

[Zend]
zend_extension = /usr/lib/php/extensions/no-debug-non-zts-20060613/ioncube_loader_dar_5.2.so

 

GD Library

gd.so (568KB)
[SHA-1 = 53fe03db4a3a70641575d36226e6c07dccfc36de]

GD Library must be compiled and installed in order to have extension really working on images. Add the following line to your php.ini:

extension = gd.so

 

Gettext

gettext.so (18KB)
[SHA-1 = 174034a31169e11b0abdba7686087168032a84bb]

PHP Extension for GNU Gettext utility. Add the following line to your php.ini:

extension = gettext.so

 

MCrypt

mcrypt.so (44KB)
[SHA-1 = f7ead521d9ae354a5f60133f5e5a21018184be22]

This extension is intended as replacements for the old Unix crypt, except that they are under the GPL and support an ever-wider range of algorithms and modes. It’s required by projects like Magento. Please note that you must have Libmcrypt installed. Don’t forget to add the following line to your php.ini:

extension = mcrypt.so

 

Mhash

mhash.so (13KB)
[SHA-1 = 2c6d86a3e5cc630c3006d0fe8c2b65c58a5c3f2c]

This extension is an interface to the mhash library. Mhash supports a wide variety of hash algorithms such as MD5, SHA1, GOST, and many others. Add the following line to your php.ini:

extension = mhash.so

 

PDO MySQL

pdo_mysql.so (34KB)
[SHA-1 = 6850b46aad91f1e9e12a5ef2b220c9e0119cec2a]

This extension enables mysql driver for PDO interface. It has been tested with MySQL 5.1.26 package for Mac OS X 10.5 (x86_64) and requires exact path for socket and app as shown above. As usual, download extension, copy in folder I mention above and add the following line to your php.ini:

extension = pdo_mysql.so

 

SOAP

soap.so (448KB)
[SHA-1 = 1a5bf50f2548082dc7c5a1904340bcb546794fd9]

SOAP is a protocol specification for exchanging structured information in the implementation of Web Services in computer networks. The SOAP extension can be used to write SOAP Servers and Clients. It supports subsets of SOAP 1.1, SOAP 1.2 and WSDL 1.1 specifications. Download the extension file and copy it into right folder, then add the following line to your php.ini:

extension = soap.so

 

ZIP

zip.so (86KB)
[SHA-1 = 9f1c6fbdb5d80e687071e03f0a721c8c32af9fd0]

This extension enables you to transparently read or write ZIP compressed archives and the files inside them. Download, copy into the extensions folder and add the following line to your php.ini:

extension = zip.so

 

Bookmark with:

Deli.cio.us    reddit    Facebook    StumbleUpon    Newsvine
Last Updated on Friday, 13 November 2009 23:46