Capacity Reports Logo  

Performance & Capacity Planning for AIX and Power Systems

Here are the instructions for complying Apache2 with PHP on AIX6.1.

Compiling Apache2+ using GCC

# cd /download/directory/apache2

# gunzip httpd-2*tar.gz

# tar xvf httpd-2*.tar

# cd httpd*

Build the configuration file enabling shared object

# ./configure -C --enable-so --prefix /opt/freeware/apache2
Compile the server

# make

Install the server (/opt/freeware/apache2)
# make install




Compiling PHP using GCC

# cd /download/directory/apache2

# gunzip php*tar.gz

# tar xvf php*.tar

# cd php-5.1.4


Build the configuration file enabling shared objects


# export PATH=/opt/freeware/bin:$PATH

# ./configure --prefix=/opt/freeware --with-apxs2=/opt/freeware/apache2/bin/apxs --with-config-file-path=/opt/freeware/apache2/conf --with-gd --with-pear --with-gettext --with-mime-magic --with-zlib-dir=/opt/freeware/lib --enable-shared --disable-static --with-png --with-zlib --with-bz2 --with-xml --with-jpeg-dir=/opt/freeware/lib --with-png-dir=/opt/freeware/lib --with-xpm-dir=/opt/freeware/lib --with-freetype-dir=/opt/freeware/lib

# make

NOTE: There will be compiler warnings about pointers type mismatches. The can be disregarded.
Install PHP with the following two commands
# cp .libs/libphp5.so /opt/freeware/apache2/modules
# cp php.ini-recommended /opt/freeware/apache2/conf/php.ini

Configuring Apache2 with PHP
Stop Apache2

# /opt/freeware/apache2/bin/apachectl -k stop
Edit /opt/freeware/apache2/conf/httpd.conf, adding the following at the end

LoadModule php5_module modules/libphp5.so
AddType application/x-httpd-php .php
DirectoryIndex index.php


Edit the /opt/freeware/apache2/conf/php.ini file

Change the php variable:
;date.timezone =
to reflect your timezone
Restart Apache2