Install Apache and PHP7 separately under Windows

Source: Internet
Author: User
Tags php download microsoft website

Preface: A year of PHP did not have their own environment, with the integration of the environment, and recently wanted to use PHP7 and Laravel5.5, so decided to build a local environment.

1. download Apache (due to PHP7 requirements, so to download 2.4 or more versions), official website http://httpd.apache.org/download.cgi

Click to enter, appears the following page, this page probably said, does not provide the Windows version of the download, only provide the source code if you have enough to build your own, or choose the official website recommended, choose which according to their preferences I conveniently is the first choice, go in and continue according to the prompt to continue to operate.

Apache2.4 is compiled with VC14 so you also need to download Visual C + + redistributable for visual Studio, go to the Microsoft website and download the direct installation.

2. download php7,php download is relatively simple, directly to the official website to download the corresponding operating system php7.* can be.

3. PHP7 download down no need to install only need to configure

①. Official recommendation, the PHP7 directory under the php.ini-production renamed to PHP.ini, since the official recommendation, then we will press the official recommendation.

②. Modifying the php.ini directory:doc_root =d:\apache24\htdocs is followed by the Apache Htdocs directory absolute Path,

Extension_dir = "ext" ext is changed to the absolute path of ext under PHP installation path.

Open the required extensions Extension=php_mysqli.dll and Extension=php_pdo_mysql.dll before the semicolon is removed, and then save the file.

4. Configure Apache,apache conf configuration file http.conf has a srvroot modified to its own corresponding path, (i Apache24 the absolute path of the file is C:\sofes\Apache \apache\apache24, so modify the values),

At the end of the file, add the following statement (two paths are modified to their corresponding paths).

5. under Htdocs add info.php, write (test), double-click the bin directory Httpd.exe, and then enter localhost/info.php in the browser, the page appears phpinfo information, that is successful.

<?php    phpinfo ();? >

6. Add Apache service, under CMD under the CD to Apache's Bin directory: Execute

Httpd-k Install

7. error parsing, final execution httpd-k install If the following error occurs, run cmd as an administrator.

The following prompt is not an error, but if there are errors under this sentence must be resolved before you can add Apache services, such as 80 port is occupied, and so on, error resolution Baidu itself.

Install Apache and PHP7 separately 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.