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...