Install PHP
Run these commands as root
cd /cacti-install
tar -zxvf php*
cd php*
./configure --prefix=/www/php --with-apxs2=/www/bin/apxs --with-config-filepath=/
www/php --enable-sockets --with-mysql=/usr/local/mysql --with-zlibdir=/
usr/include –with-gd
make
make install
cp php.ini-dist /www/php/php.ini
cp /www/conf/httpd.conf /www/conf/httpd.conf.backup
echo ####################### >> /www/conf/httpd.conf
echo # Added via Lee Carter's Script >> /www/conf/httpd.conf
echo ####################### >> /www/conf/httpd.conf
echo AddType application/x-tar .tgz >> /www/conf/httpd.conf
echo AddType application/x-httpd-php .php >> /www/conf/httpd.conf
echo AddType image/x-icon .ico >> /www/conf/httpd.conf
echo DirectoryIndex index.php index.html index.html.var >> /www/conf/httpd.conf
service httpd stop
service httpd start
PHP Install Script