Posts Tagged installation
linux php installation
To compile PHP
- $ cd /usr/src
- $ tar -zxvf php-4.3.0.tar.gz
- $ cd /usr/src/php-4.3.0
- $ ./configure –prefix=/wwwroot/php –with-apxs2=/wwwroot/bin/apxs –with-config-file-path=/wwwroot/php –with-mysql
- $ make
- $ make install
Now you have to edit Apache configuration file /wwwroot/conf/httpd.conf.
If LoadModule php4_module modules/libphp4.so line hasn’t been added by php install to /wwwroot/conf/httpd.conf, then you have to add it yourself. Add it somewhere below section named “Dynamic Shared Object (DSO) Support”
LoadModule php4_module modules/libphp4. Now add this line to /wwwroot/conf/httpd.conf file:
Add Type application/x-httpd-php .php
Start Apache now:
$ /wwwroot/bin/apachectl start
Now create a test PHP file using any text editor and add these lines to it:
Save it under /wwwroot/htdocs as info.php
Now test PHP installation by accessing file info.php:
http://localhost/info.php
Add comment August 12, 2009