Install Php7+apache2.4+mysql under Windows because of learning needs
1. Installing Apache
Download Apache2.4 to official website, select the Windows version, here I download version 2.4
Unzip after download
Modify Conf/httpd.conf
The path here is the Apache installation directory
Modify the site code store path
Okay, start Apache, go to the bin directory, enter httpd, and the browser input 127.0.0.1 can show it ' s work
2. Apache Load PHP7 Module
Download PHP7 version, the main distinction is the thread safe, one is non thread safe, only the thread safe has Php7apache2_4.dll file
Add the following statement to the last side of the conf/httpd.conf
#加载php7模块
LoadModule php7_module "C:/lamp/php7/php7apache2_4.dll"
AddHandler application/x-httpd-php. php
Phpinidir "C:/LAMP/PHP7"
Restart Apache, enter the Web site, you can display the PHP code
3, PHP7 loading mysqli with PDO module (this time for the mysql5.6 version, has discarded MySQL)
<?php
echo "This is a test</br>";
echo "ASDFASDFADSF";
$mysql _server_name= "localhost"; Database server name
$mysql _username= "root"; Connect to database user name
$mysql _password= "??????"; Connect Database Password
$mysql _database= "??????"; The name of the database
Connecting to a database
$conn =mysqli_connect ($mysql _server_name, $mysql _username,
$mysql _password);
Var_dump ($conn);
4, MySQL just installed do not know the password, so change the password, the following operation
1. Stop the MySQL service net stop mysql2. Start MySQL mysqld without checking permissions --skip-grant-tables You can see that the window cursor flashes in the first position on the next line, indicating that it has been started, No tube required. 3. Create a new command-line window to start MySQL mysql4. Modify The root password mysql>use mysql mysql>update user set Password=password (" Root ") where user= ' root '; Mysql>flush privileges;
At this point, apache,php,mysql installation is complete
Install Php7+apache2.4+mysql under Windows