PHP environment (apache, PHP, Mysql) detailed configuration method _ PHP Tutorial-php Tutorial

Source: Internet
Author: User
PHP environment (apache, PHP, Mysql) detailed configuration method. Preparations before installation: Download the PHP, apache, and mysql installation packages. you can download them on the relevant official website. The installation steps are as follows. to install Apache, run and install it directly. we need to install it on D: PH. preparations before installation: Download the PHP, apache, and mysql installation packages and download them on the relevant official website. The installation steps are as follows:
1. install Apache and run it directly. we can install it in the D:/PHP/Apache/directory.
2. decompress the PHP compressed package to the specified PHP Directory (specify D:/PHP/here and rename it PHP5)
3. modify the Apache configuration file
1. load the PHP module and add it to the Apache configuration file.
LoadModule php5_module "D:/PHP/PHP5/php5apache2_2.dll" // D:/PHP/PHP5/for the php installation directory
2. add AddTypeapplication/x-httpd-php. php. phtml // to set the apache solution file type.
// Specify the php configuration file path
Add phpinidir "D:/PHP/PHP5" to set the php configuration file directory (first rename PHP. iniDevelopment in the PHP installation directory to php. ini)
4. restart Apache
5. verify that PHP is successfully installed.
In the D: \ PHP \ Apache \ htdocs Directory, create a phpinfo. PHP file and enter the following content.
[Php] view plaincopy
Phpinfo ();
?>
Enter http: // localhost/phpinfo in the browser. php: Port 80 by default. if it is not port 80, the localhost must be followed by a port number. if the installation is successful, open the PHP related information page. otherwise, check whether the related directory is correctly installed.
6. install the mysql service, directly run the mysql installation file, and perform the installation step by step as prompted.
5. add the Mysql module
1. copy libMysql. dll, phpmysql. dll, and phpmysqli. dll from the PHP installation directory to the Windows directory of drive C.
2. open the PHP configuration file
1. cancel the semicolon before extension = php_mysql.dll and extension = php_mysqli.dll
2. set the extension path extension_dir = "D:/php/PHP5/ext" in PHP. ini"
3. restart Apache
4. access the phpinfo. php page again in the browser. if mysql and mysqli columns are added to the page, the module is added successfully. otherwise, recheck the preceding steps.
Verify mysql



From the column jt521xlg

Installation 1. install Apache and run the installation directly. we can install it to D:/PH...

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.