New Php7+apache environment construction under Win7_64bit

Source: Internet
Author: User

Tossing a half-day or so of time, successfully configured successfully under Win7_64bit PHP+APACHE+MIRIADB database

+ Configuration tool Download and unzip

Apache HTTP Server 2.4.25 : HTTP://WWW.APACHEHAUS.COM/CGI-BIN/DOWNLOAD.PLX

-About Version: Visual Studio (VC9) Visual Studio (VC11) Visual Studio (VC14) author download VC14 version
-Download: Click Download Locations

-After the download is done, unzip to the D-Disk folder Phptool and rename the folder to Apache24

PHP 7.1 (7.1.1): http://windows.php.net/download/

-About Version:

TS refers to thread Safety, which is threaded, and is typically selected when IIS is loaded in ISAPI mode.

NTS is the None-thread Safe, usually in fast CGI run time to choose this version, with better performance.

-Download: Click Zip

-After the download is done, unzip to the D-Disk folder Phptool and rename the folder to PHP7

03. The database installation please own Google

+apache Installation

-01. Locate the D:\phptool\Apache24\conf\httpd.conf file, open it with Notepad, and then change the query "Define srvroot" to:

Define srvroot "D:/phptool/apache24"
ServerRoot "${srvroot}"

-02. Find "Dir_module" revised to

<ifmodule dir_module>
DirectoryIndex index.html index.php
</IfModule>

-03. Query "Listene 80" and then win+r enter CMD in the input command netstat-a (see if 80 ports are occupied)

Change 80 port to 8010,8080 if occupied

such as Listen 8080

-04. Add PHP7 support and paste the following code in Notepad

# PHP7 Support
LoadModule Php7_module D:/phptool/php7/php7apache2_4.dll
AddType application/x-httpd-php. php. html. htm
Phpinidir "D:/PHPTOOL/PHP7"

-05. Ctrl+s Saving httpd.conf files

-06. Installing Apache Services

Stand-alone Windows button, locate the command prompt in the attachment, send to the shortcut desktop

Right-click to run as Administrator

Input command

"D:\phptool\Apache24\bin\httpd.exe"-K install-n Apache

Include quotation marks, the command means to install the Apache service and name the service Apache (you can also change to another), enter

Successful execution

Errors reported here must is corrected before the service can be started. meaning

If there is an error message behind the sentence, the service installation fails and the error needs to be corrected first. If none is successful.

-07. Apache Server Uninstall

In the cmd Command window, enter the following (it is recommended to stop the service before deleting):

SC Delete Apache return

Apache is the service name of the Apache server

+php Configuration

01. Locate the Php.ini-development file in the D:\PHPTOOL\PHP7 directory Ctrl + V to get the copied file modified by name PHP.ini

02. Notepad to open the php.ini file, modify the configuration extension_dir= "ext" for extension_dir = "D:/phptool/php5/ext"

Where D:/phptool/php5/ext holds all the dynamic link library files

03. Follow the steps to remove the preceding semicolon and let PHP connect to the database in MySQL or mysqli

+ Configuration Complete test PHP is configured successfully

-01. Create the index.php in the D:\phptool\apache\htdocs file with the content:

<?php  phpinof ();?>

-02. Run ApacheMonitor.exe under D:\phptool\Apache24\bin as Administrator, click Start to open the service, enter localhost in the browser to see that the configuration is successful

-03 (optional) httpd.conf Modify the Htdocs path, for example, to create a folder on the D disk WWW, you need to modify the httpd.conf file DocumentRoot as follows

#
DocumentRoot "D:\www"
<directory "D:\www" >
#

Once the modifications are complete, restart the Apache server.

New Php7+apache environment construction under Win7_64bit

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.