Windows 10 Build Apache24 + PHP7 + MySQL Environment

Source: Internet
Author: User
Tags apache php install php php mysql web hosting

I. Preparation1. Resources

Apache https://www.apachelounge.com/download/

PHP http://windows.php.net/download#php-7.0

mysq L http://dev.mysql.com/downloads/mysql/

VC2015 Support Package https://www.microsoft.com/zh-CN/download/details.aspx?id=48145

When you download it, choose 32-bit or 64-bit according to your system.

2. Installing Vc_redist

This VC2015 support package needs to be installed before Apache is installed, otherwise it will be reported missing when Apache is installed VCRUNTIME140.dll

two. Installing Apache1. Configuration

Create a new folder on the D drive, I'll name it "Server" here.

Unzip the Apache archive package and copy the Apache24 folder inside the server directory

Locate the httpd.conf file in the Conf directory, open it with a text editor such as Notepad or UE, and make the following changes:

1.

Change directory to Apache directory where D:/server/apache24

2.

This is the site file directory, the default is Htdocs, you can modify as needed, the changed directory must exist , that is, you need to manually create

3.

We add index.php after the index.html.

4. In order to support PHP, at the end of the file add

# php Supportloadmodule php7_module "D:/server/php7/php7apache2_4.dll" AddHandler application/x-httpd-php. php# Configure the path to Php.iniphpinidir "D:/SERVER/PHP7"

  

2. Start

Open cmd and run the following command

The Windows Firewall prompt will pop up, allowing it to be OK.

Do not close the cmd window, open the browser, enter http://127.0.0.1 if you see it Works, the Apache has started. If you don't see it, don't worry:

have you changed the web hosting directory?

is: Copy the index.html file from the Htdocs directory to the directory where you changed the Web page file.

No: Check the above steps individually.

OK, Apache can start, we add Apache into the system service:

Run cmd as Administrator and run the following command ( the previous CMD window needs to be closed first ):

two. Install PHP1. Configuration

Also unzip the PHP to the server directory and rename the directory to PHP7

Locate the php.ini-development in the directory, copy one and rename it to PHP.ini

Open with a text editor and make the following changes:

Find, remove the preceding semicolon and change ext to D:/server/php7/ext

Similarly, find, remove the front semicolon, turn on mysqli support, you can turn on other support according to your needs.

2. Testing

Open Windows Task Manager, find Apache24 in the service, restart Apache service

Rename the index.html in the Apache24/htdocs directory to another, and then create a new text document named index.php, Note that the suffix is. PHP

And then open the edit

<?php  phpinfo ();?>

After saving, open browser, Access http://127.0.0.1 if you see the same page as I see it, that's right.

three. Install MySQL

We downloaded the MSI file and installed it directly.

At this point, we have successfully built the Apache PHP MySQL environment.

Windows 10 Build Apache24 + PHP7 + MySQL Environment

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.