Build an Apache + Mysql + PHP development environment in windows, apachemysql
Requirements
LoadModule php5_module "D:/wamp/php-5.3.25/php5apache2_2.dll" AddType application/x-httpd-php. php PHPIniDir "D:/wamp/php-5.3.25 /"
The code location in the configuration file is as follows:
DocumentRoot "E:/2015/wamp/Apache2.2/htdocs"
Let Apache identify the index. php page
<IfModule dir_module> DirectoryIndex index.html index.php</IfModule>
Test whether Apache is successfully built.
Mysql-u [user name]-p [Password]
// Connect to MYSQLmysql-h host address-u user name-p User password // Change password mysqladmin-u user name-p old password new password # display command/display in the Current Database Server database List: mysql> show databases; // display the data table in the database: mysql> USE Database Name; mysql> show tables; // display the data table structure: mysql> DESCRIBE table name;PHP
Decompress the compressed file to the specified folder (here you can try it out, and provide my directory structure below). php can run in two ways: CGI (corresponding file php5ts. dll files) and SAPI. Because Apache is used, it is run in the SAPI module. The corresponding file is php5apache2_2.dll. Configure php. INI file. php provides two templates: php. ini-development and php. ini-production: the former is suitable for development programs (for testing), and the latter has high security settings, which is suitable for product launch. Here we will change the php. ini-development file to php. ini for the configuration file.
// Here according to your actual situation and extension_dir = "E: \ 2015 \ wamp \ php-5.3 \ ext"
Set doc_root as the server root path:
// Doc_root = "E: \ 2015 \ wamp \ Apache2.2 \ htdocs" depends on your actual situation"
Add extension:
To select the extensions to run, you only need to remove the comments before extension. For example:
extension=php_mysql.dllextension=php_mysqli.dll
Test installation result
Create the phpinfo. php file in the root path of the server. The Code is as follows:
<?php phpinfo(); ?>
Enter http: // localhost/phpinfo. php In the browser. If the following interface appears, the operation is successful.
"Not bad" button or click "like" in the lower right corner of the page. You can also click the "share" floating button on the right side of the page to let more people read this article.
Author: Li-Cheng Weibo: http://weibo.com/lichen?426. Leave your footprints. Comments are welcome. You can also follow me and learn together! (^_^) If you think this article is helpful to you, you can have a cup of coffee)