PHP Development Environment under WINDOWS7 (IIS7 + PHP7 + PHPStorm2016.2.1)

Source: Internet
Author: User
Tags install php php language php development environment

Previously, it has been developed by ASP. Visual Studio 2012 is quite comfortable to use, debugging is also quite good, quite intelligent, greatly improving the development efficiency and reducing the process

The appearance of the sequence bug, and the direct installation can be used, without unnecessary operation, very convenient.

Because this time to do PHP development, in order to build the development environment is also a lot of data search, select the IDE is also reference to a lot of information, my primary goal is to debug convenient, in fact, there is no

Contact, the last choice of phpstorm (mainly to look at the interface is refreshing), in order to fix the debugging function is also searched for a long time ah, feel or no vs convenient, installation completed directly can use. So

Now record the whole process of setting up the environment.

First, the WINDOWS7 environment installs the PHP7

First you have to turn on the system IIS, click Control Panel → programs and features → turn Windows features on or off, and then tick Internet Information Services as shown in

Click OK, and the installation will be complete.

The Internet Information Services (IIS) Manager can then be found in the Control Panel → management Tool

Install IIS, next you need to install PHP Manager via Microsoft official Download https://www.iis.net/downloads/community/2010/09/php-manager-for-iis-7

Download installation is very simple, after the installation is completed, you can see the PHP Manager as shown in

Next need to go to the PHP official website download PHP7, download link: http://windows.php.net/download#php-7.0

Depending on your system choose 32-bit, or 64-bit bar, I downloaded the VC14 x64 Non thread safe zip version, that is, 64-bit non-thread-safe version.

Download complete decompression to the location you want to store, I am here to extract to the C:\php7.0

Next, in IIS, double-click the php Manager option, and then click Register New PHP version, select the folder you just extracted from PHP to select Php-cgi.exe, such as

Click OK to install the PHP7.

You can test the PHP file for normal access by creating a new Web site for IIS, and see the IIS demo for the next step.

Second, the installation of Phpstrom 2016.2.1

Phpstrom installation is very simple, official website: https://www.jetbrains.com/phpstorm/

Because it is a fee software, in order to be able to use the need to crack, start phpstrom after the selection of license server and then copy http://jetbrains.tencent.click/this address into it. Then will be able to use the normal, do not know if this address will not expire ^_^.

Well, Phpstrom has been installed, because it is English version, if the need to Chinese package, you can search the Chinese-language package, and then copy the download of the Chinese package to the Phpstorm installation directory of the Lib directory, restart it.

Third, the installation of debugging Tools Xdebug

Xdebug the current version is 2.4.1 version, official website: https://xdebug.org/download.php

According to your system download 32-bit or 64-bit version, we previously downloaded PHP is a 64-bit non-thread-safe version, so xdebug also download 64-bit non-thread-safe version, download version of PHP 7.0 VC14 (a bit)

After the download is completed, the download file Php_xdebug-2.4.1-7.0-vc14-nts-x86_64.dll stored in the location you want to store, here for the convenience of management I stored the file in the php file directory under the Ext folder.

Next, configure PHP.ini, open the php.ini file in the C:\php7.0 directory, and add the following text at the end of the file

[XDebug]
zend_extension_ts= "C:\php7.0\ext\php_xdebug-2.4.1-7.0-vc14-nts-x86_64.dll"//Here is xdebug the storage path of the dynamic link library that is downloaded is recommended to use absolute path
Xdebug.remote_enable=1//Whether the remote terminal is allowed to be opened here
Xdebug.remote_handler=dbgp
Xdebug.remote_mode=req
Xdebug.remote_host=localhost
xdebug.remote_port=9000//Here indicates the server's listening port
xdebug.idekey= "Phpstorm"//Here is the Debugger keyword in chrome and Firefox plug-in configuration to use

Such as

Next verify that the Xdebug is installed successfully

At the command prompt, enter C:\php7.0\php.exe-m.

Four, in the Phpstorm to configure the Xdebug

Start Phpstorm, create a new project, I've created a new empty project named csphp to store the path to D:\csPHP

A new index.php file was created in the project

Next, open IIS to create a new Web site named csphp, pointing to the directory where we just created the new project D:\csPHP Port set to 801

Click OK to add the site successfully.

Write a simple code in the index.php file

Browsing in IIS

Can be successfully browsed, indicating that PHP has been configured

Browse at Address http://localhost:801/index.php

The next step is to configure the phpstorm inside.

Click file → settings

Language and frame click PHP

PHP Language Level Select 7

Then click on the Interpreter option

Click "Plus" to select the following

When you've set it up, click OK.

Next, in the language and framework →php→debug→dbgp Proxy option, set the following

IDE key:phpstorm//This corresponds to the value of Xdebug.idekey
Host:localhost//This corresponds to the browse address of our project
port:9000//This is the port number

Click OK when the settings are complete.

Then click run → edit configuration open options

Click defaults→php WEB Application

Browser option Select Google Chrome click OK.

Because next we're going to install the Xdebug helper plugin in Google Chrome.

Search for Xdebug Helper in Google extensions and add

Add success and click Options when enabled

In the Options IDE key select Phpstorm and save

Finally, all of these environmental configurations have been completed.

Finally, test the Phpstorm debugging.

Click this icon in the project to open the monitor

Set breakpoints Click Google Chrome to debug

The following interface appears when the project is first debugged

Select Entire Project Click Accept, all project files can be debugged

Debug results at a glance, all variable results can be seen

Well, to this end finally completed the entire configuration, will also be the development of the project process is also recorded.

PHP Development Environment under WINDOWS7 (IIS7 + PHP7 + PHPStorm2016.2.1)

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.