# ./configure
# make
# make install
copy
php.ini-dist
to /usr/local/lib/php.ini
edit your
php.ini
file and set the following:extension_dir = "/usr/local/apache2/modules/"
# this is my apache modules directoryinclude_path = "/usr/local/lib/php
extension=php_mysql.so
if you have pgsql add:
extension=php_pgsql.so
edit your
/etc/ld.so.conf
file and add the following:/usr/local/lib
/usr/local/include
if you have pgsql add:
/usr/local/pgsql/lib
load ldconfig
# ldconfig -v
edit your apache
httpd.conf
configuration fileverify that the line below is not in comment:
LoadModule php5_module modules/libphp5.so
then add the following lines:
-AddType application/x-httpd-php .php
-AddType application/x-httpd-php-source .phps
-AddType application/x-httpd-php .phtml
restart your apache server
create a test php file with the content below:
<?php phpinfo(); ?>
then test by browsing your test php file
sometimes it takes a while before php pages work after installation. give it a few minutes before testing
No comments:
Post a Comment