This post originated from an RSS feed registered with PHP Buzz
by Chris Shiflett.
Original Post: Installing PHP and Apache 2e
Feed Title: Chris Shiflett's Blog
Feed URL: http://www.feedburner.com/fb/static/error.html
Feed Description: Author, Consultant, Programmer, Speaker, Trainer
As part of the work Geoff and I are doing with Apache-Test, I wrote some instructions for installing PHP and Apache with my favorite options.
To install PHP as a shared library:
$ tar -xvzf apache_1.3.31.tar.gz
$ tar -xvzf php-5.0.2.tar.gz
$ cd apache_1.3.31
$ ./configure \
--prefix=/usr/local/apache \
--enable-module=most \
--enable-shared=max
$ make
$ sudo make install
$ cd ../php-5.0.2
$ ./configure \
--prefix=/usr/local/php \
--with-apxs=/usr/local/apache/bin/apxs \
--with-gd \
--with-mysql=/usr/local/mysql \
--enable-sockets
--with-zlib-dir=/usr/include
$ make
$ sudo make install
To install PHP as a static library:
$ tar -xvzf apache_1.3.31.tar.gz
$ tar -xvzf php-5.0.2.tar.gz
$ cd apache_1.3.31
$ ./configure
$ cd ../php-5.0.2
$ ./configure \
--prefix=/usr/local/php \
--with-apache=../apache_1.3.31 \
--with-gd \
--with-mysql=/usr/local/mysql \
--enable-sockets \
--with-zlib-dir=/usr/include
$ make
$ sudo make install
$ cd ../apache_1.3.31
$ ./configure \
--prefix=/usr/local/apache \
--activate-module=src/modules/php5/libphp5.a \
--enable-module=most \
--enable-shared=max
$ make
$ sudo make install
If you're planning to attend ApacheCon, you don't want to miss our talk, Testing PHP with Perl. It will (hopefully) change the way you develop PHP applications.