PHP assembly and configuration-php Tutorial

Source: Internet
Author: User
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.

Contact Us

The content source of this page is from Internet, which doesn't represent Alibaba Cloud's opinion; products and services mentioned on that page don't have any relationship with Alibaba Cloud. If the content of the page makes you feel confusing, please write us an email, we will handle the problem within 5 days after receiving your email.

If you find any instances of plagiarism from the community, please send an email to: info-contact@alibabacloud.com and provide relevant evidence. A staff member will contact you within 5 working days.

A Free Trial That Lets You Build Big!

Start building with 50+ products and up to 12 months usage for Elastic Compute Service

  • Sales Support

    1 on 1 presale consultation

  • After-Sales Support

    24/7 Technical Support 6 Free Tickets per Quarter Faster Response

  • Alibaba Cloud offers highly flexible support services tailored to meet your exact needs.