Install Php7+apache2.4+mysql under Windows

Source: Internet
Author: User

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

Related Article

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.