Set up the PHP5.6 environment in WIN8.1, and set up the php5.6 _ PHP Tutorial in win8.1.

Source: Internet
Author: User
Set up the PHP5.6 environment in WIN8.1 and set up php5.6 in win8.1. In the PHP5.6 environment built in WIN8.1, win8.1 set up php5.6. the first time I came into contact with php was around. at that time, I focused on C #, and I was reluctant to use php for many reasons, set up the PHP5.6 environment in WIN8.1 and set up php5.6 in win8.1.

The first time I came into contact with php was around-. at that time, I was focusing on C #, and I was reluctant to use php. many of the reasons are that PHP breakpoint debugging has never been successful, the echo method is used to print logs, causing resentment against php, and missing a good opportunity to study php in depth. This article aims to record the beginning of php and help beginners who are new to php to configure the php environment smoothly, without fear of php.

1. system environment overview

Windows is a very common system. I believe there is no need to explain more here. So how to enable IIS (win8.1) is actually there are many tutorials on the internet. I will only give a brief introduction here.

① Install. net fromework 3.5

IIS depends on. net3.5. Therefore, the first step is to install. net fromework3.5. There are roughly two installation methods: Online download, which is very slow (really slow). here we will introduce the second method: offline installation of. net fromework3.5. Find the iso file for win8 installation and load it to the virtual optical drive. if there is an engraved USB flash drive, insert it to the USB flash drive. Run inventory/online/enable-feature/featurename: NetFX3/Source: V: \ sources \ sxs. disk V indicates the drive letter of the virtual optical drive or the drive letter of the USB flash drive.

② Enable IIS

For development, it should be a small case to enable IIS. I will not talk about it here.

2. advance work

① Environment and IDE file downloads

The following is a reference URL. if the URL cannot be opened or changed, search for the latest file version. the following link version date is

PHPManager: http://www.iis.net/downloads/community/2010/09/php-manager-for-iis-7

PHP: http://windows.php.net/download

XDebug: http://xdebug.org/

PHPStrom: http://www.jetbrains.com/phpstorm/

Xdebug Helper: http://www.chromein.com/crx_11294.html

② Installation

The initial IIS does not support php, so we first download the PHP Manager tool. after the installation is successful, we can see the php manager icon in IIS, for example:

Go to php manager. Subsequent configuration is relatively simple. please use baidu. the focus of this article is on breakpoint debugging, so it will not be too long-winded. After the php configuration is complete, the following page is displayed:

Copy the decompressed xdebug file downloaded to the ext folder in the php directory.

The next step is the IDE installation. PHPStorm installation is still very simple. I will not talk about it here. Xdebug helper is an extension tool of Chrome. enter chrome: // extensions/in the browser /, drag the downloaded crx file into the page.

III. configuration

① Xdebug

Xdebug configurations are found on the internet. only my configurations are provided here. in the php. ini file, add the following code. pay attention to the location of several files.

[Xdebug]; xdebug configure zend_extension = "D:/php/php-5.6.8-nts-Win32-VC11-x64/ext/php_xdebug-2.3.2-5.6-vc11-nts-x86_64.dll"; load Xdebugxdebug. idekey = "PHPSTORM" xdebug. profiler_enable = onxdebug. trace_output_dir = "D:/php/xdebug-log"; xdebug data file directory xdebug. profiler_output_dir = "D:/php/xdebug-log"; xdebug data file directory xdebug. auto_trace = On; enable automatic tracking xdebug. show_exception_trace = On; enable exception tracking xdebug. remote_autostart = Off; enable remote debugging to automatically start xdebug. remote_enable = On; enable remote debugging xdebug. remote_handler = dbgp; the application layer communication protocol xdebug for zend studio remote debugging. remote_host = localhost; the IP address of zend studio that can be connected xdebug. remote_port = 9001; reversely connects to the port xdebug used by zend studio. collect_vars = On; collect variable xdebug. collect_return = On; collect the returned value xdebug. collect_params = On; collect the xdebugbug parameter. max_nesting_level = 10000

② PHPStorm

Go to php settings

  

Select php language settings

Add an interpreter. if you are running in IIS, you do not need to add an interpreter. However, if you open your php code directly through phpstorm, you need to add the interpreter as follows, press Alt + F2. You do not need to install IIS to run php through the interpreter.

The next step is to configure phpStorm debug. In fact, phpstorm debug is basically set by default, but we 'd better modify it, because Port 9000 may be occupied by other applications. So we need to change to another port, such as 9001

Note: the port here must be consistent with the port configuration in xdebug in php. ini. please refer to the above configuration code.

Xdebug. remote_port = 9001; reverse connect to the port used by zend studio

③ Xdebug helper

It is a plug-in of Chrome, which is really easy to use and easy to configure.


The configuration is almost complete. Let's test it.

IV. breakpoint debugging and testing

① Find the page, enable debugging, click the bug, and select Debug.



② Enable PHPstorm listener


Refresh the http: // localhost/php/FirstPHP. php page



Running result:


The results are running correctly. this article ends, hoping to help viewers.

The above is all the content of this article. I hope you will like it.

The first time I came into contact with php was around-. at that time, I was focusing on C #. I was relatively reluctant to use php for many reasons ,...

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.