PHP installation and configuration compilation installation php5-5.2.6-49.11.src.rpm:. configure -- prefixusrlocalphp -- with-apxs2usrlocalapachebinapxs -- with-config-file-pathusrlocallibmake; makeinstallOK, now 5 PHP installation and configuration have been completed
Compile installation php5-5.2.6-49.11.src.rpm:
./Configure -- prefix =/usr/local/php -- with-apxs2 =/usr/local/apache/bin/apxs -- with-config-file-path =/usr/local/lib
Make; make install
OK. Now we have finished 50%. now we have modified the httpd. conf and php. INI files.
First, run the following command:
Cp/etc/php5/cli/php. ini/usr/local/lib/php. ini
Vi/usr/local/lib/php. ini
Modify the following content
Register-golbals = On
Add extension = mysql. so (access Mysql)
Then modify the httpd. conf file.
Vi/usr/local/apache/conf/httpd. conf
Modify it to the following content:
# Change ServerAdmin [email protected]
# DocumentRoot "/home/httpd/html/" is the main directory of the html file.
# Same as above
# Options FollowSymLinks MultiViews for security reasons, remove "Indexes"
#
# DirectoryIndex default. php default. phtml default. php3 default.html default.htm
#
# Set the default file name order of apache
AddType application/x-httpd-php. php. phtml. php3. inc
AddType application/x-httpd-php-source. php
# Set the php file suffix
OK! Now that 98% is complete, start the apache service
/Usr/local/apache/bin/apachectl start
Create a test. php file and put it in the main directory to test apache.
Phpinfo ();
?>
See it! If it succeeds, your phpinfo interface will be displayed.
Problem 1: An error occurred while installing php configure. the system prompts that xmllib cannot be found. Solution: install libxml2-2.7.1-8.6.src.rpm
Question 2: access http: // 127.0.0.1/index. php, the prompt is displayed."YourPHP installation appears to be missing the MySQL extension which is required by WordPress ."Work und: install the php5-mysql-5.2.6-52.8.i586.rpm and its prerequired package: php5-pdo-5.2.6-49.11.i586.rpm; modify php. ini and add extension = mysql. so.