Skip to content. | Skip to navigation

Personal tools
Log in
Sections
You are here: Home Web PHP PHP on Leopard

PHP on Leopard

Need to install a PHP5 development environment on OOTB OSX Leopard? Read on...


Apache

First install apache2 (httpd from apache.org) to /usr/local/apache2/ as per php.org docs Then:

Curl

If you need curl, download the sources from the official web site. Unpack the tarball in
your /usr/local/src directory and join it.

> cd /usr/local/src/curl-7.19.4
> ./configure --prefix=/usr/local/bin/curl
> make
> make test
> sudo make install

PHP

$ cd /usr/local/src
$ cd php-5.2.5
$ sudo ./configure --prefix=/usr/local/php5 --mandir=/usr/share/man --infodir=/usr/share/info --sysconfdir=/etc --with-zlib --with-zlib-dir=/usr --with-openssl --enable-ftp --with-mysql=/usr/local/mysql --with-mysqli=/usr/local/mysql/bin/mysql_config --enable-soap --with-apxs2=/usr/local/apache2/bin/apxs --with-curl=/usr/local/bin/curl
$ sudo make
$ sudo make install
$ ls
$ ls /usr/local/php5/lib/
$ cp php.ini-recommended /usr/local/php5/lib/php.ini
$ sudo cp php.ini-recommended /usr/local/php5/lib/php.ini

Pear

Install pear (download go-pear.php from the internets):

$ /usr/local/src/php-5.2.5/sapi/cli/php go-pear.php

Pear will need a link to the cli version of php:

$ cd /usr/local/php5/bin
$ sudo ln -s /usr/local/src/php-5.2.5/sapi/cli/php

PHPUnit

Install it using the pear package installer:

$ /usr/local/src/php-5.2.5/bin/pear channel-discover pear.phpunit.de
$ /usr/local/src/php-5.2.5/bin/pear install phpunit/PHPUnit

Test runner will be in /usr/local/src/php-5.2.5/bin/

You can link to this somewhere in the PHP path to run tests

Document Actions

Comments (0)

« February 2012 »
February
MoTuWeThFrSaSu
12345
6789101112
13141516171819
20212223242526
272829