PHP Installation From Source Code
PHP Installation
This guide will help you for installing your php script on your linux server (install with php source code)
1. Downloading and untaring PHP package.
#cd /usr/local/src/webserver
#wget ‘php-version.tar.gz’
#tar zxpf php-version.tar.gz 2. Create your configuration file.
#pico php_install
3. Add the following.
#cd php-version-folder
#./configure –with-apxs2=/usr/local/apache/bin/apxs –disable-debug –enable-ftp –enable-inline-optimization –enable-magic-quotes –enable-mbstring –enable-mm=shared –enable-safe-mode –enable-track-vars –enable-trans-sid –enable-wddx=shared –enable-xml –with-dom –with-gd –with-gettext –with-mysql=/var/lib/mysql –with-mysqli=/var/lib/mysql/bin/mysql_config –with-regex=system –with-xml –with-zlib-dir=/usr/lib –with-jpeg-dir=/usr/lib
4. Change the permissions, configure, make, and install then copy your INI file over.
#chmod 755 php_install
#./php_install
#cd php-version-folder
#make
#make install
#cp php.ini-dist /usr/local/lib/php.ini
5. To finish it off, you will need to add PHP support into Apache by editing the httpd.conf file. Go ahead and add the following to the bottom of the file.
AddType application/x-httpd-php .php .php4
AddType application/x-httpd-php-source .phps
6. Change your DirectoryIndex setting from
DirectoryIndex index.html
to
DirectoryIndex index.php index.html
7. Restart the Apache Webserver.
#apachectl restart
Done for PHP Install.

















