Php server debugging ZendDebugger installation tutorial

Source: Internet
Author: User
Debugging Technology is an indispensable part of our programming. debugger is a required component in every IDE environment. In this case, ZendStudio's integrated environment has a debugger, which is a matter of course. However, when the debugger is used for configuration, the strength shown by the debugger is actually, the debugging functions of Zend Studio ("ZDE" for short) are divided into internal debugging and remote debugging. Internal debugging is a preliminary debugging of the code using ZDE's built-in PHP (with versions 4 and 5). we focus on remote debugging, because it can completely simulate a real running environment.

Remote Debugging requires the support of components on the server side. the content of today is how to install the debugging environment on the server side. the debugging component used is Zend Debugger, which is lightweight and sufficient, at the time of writing this article, the latest version is 5.2.14, which is slightly updated with the widely circulated version 5.2.10 on the Internet. My server is apache in windows, so I downloaded Zend debuggerof windows, and the compressed package is about 2.1m, and there is a readme.txt. I think it is necessary to read it:

Zend Debugger installation instructions
-------------
1. Locate ZendDebugger. so or ZendDebugger. dll file that is compiled for the correct version of PHP (4.3.x, 4.4.x, 5.0.x, 5.1.x, 5.2.x) in the appropriate directory.
2. Add the following line to the php. ini file:
Linux and Mac OS X: zend_extension =/full/path/to/ZendDebugger. so
Windows: zend_extension_ts =/full/path/to/ZendDebugger. dll
Windows non-tread safe: zend_extension =/full/path/to/ZendDebugger. dll

(*) The windows non-thread safe is used only with Zend Core 2.0

3. Add the following lines to the php. ini file:
Zend_debugger.allow_hosts =
Zend_debugger.expose_remotely = always


4. Place dummy. php file in the document root directory.
5. Restart web server.

The installation method has been described in detail here, so I will describe it again in an obscure language.
The following is a list of all files in the compressed package:
ZendDebugger-5.2.14RC9-cygwin_nt-i386 \ md5
ZendDebugger-5.2.14RC9-cygwin_nt-i386 \ Inventory. xml
ZendDebugger-5.2.14RC9-cygwin_nt-i386 \ 4_3_x_comp
ZendDebugger-5.2.14RC9-cygwin_nt-i386 \ 4_3_x_comp \ ZendDebugger. dll
ZendDebugger-5.2.14RC9-cygwin_nt-i386 \ 4_4_x_comp
ZendDebugger-5.2.14RC9-cygwin_nt-i386 \ 4_4_x_comp \ ZendDebugger. dll
ZendDebugger-5.2.14RC9-cygwin_nt-i386 \ 5_0_x_comp
ZendDebugger-5.2.14RC9-cygwin_nt-i386 \ 5_0_x_comp \ ZendDebugger. dll
ZendDebugger-5.2.14RC9-cygwin_nt-i386 \ 5_rjx_comp
ZendDebugger-5.2.14RC9-cygwin_nt-i386 \ 5_rjx_comp \ ZendDebugger. dll
ZendDebugger-5.2.14RC9-cygwin_nt-i386 \ 5_2_x_comp
ZendDebugger-5.2.14RC9-cygwin_nt-i386 \ 5_2_x_comp \ ZendDebugger. dll
ZendDebugger-5.2.14RC9-cygwin_nt-i386 \ 5_2_x_nts_comp
ZendDebugger-5.2.14RC9-cygwin_nt-i386 \ 5_2_x_nts_comp \ ZendDebugger. dll
ZendDebugger-5.2.14RC9-cygwin_nt-i386 \ dummy. php
ZendDebugger-5.2.14RC9-cygwin_nt-i386 \ README.txt

Decompress the appropriate Zend Debugger version corresponding to your current php version. my php version is 5.2.5, therefore, I dragged 5_2_x_comp out (5_2_x_nts_comp indicates non-tread safe, so it is useless if you do not understand the specific purpose). I will use 5_2_x_comp \ ZendDebugger. dll to D: \ myserver \ ZendDebugger \ 5_2_x \ ZendDebugger. dll. php decompress the package to the web root directory. I set apache DocumentRoot to D:/myserver and copy dummy. php to D: \ myserver \ wwwroot, and then modify php. ini, added the following content:

Zend_extension_ts = D:/myserver/ZendDebugger/5_2_x/ZendDebugger. dll
Zend_debugger.allow_hosts = 127.0.0.1/32,192.168 .1.88/24
Zend_debugger.expose_remotely = always

Then restart apache. after a slight wait, we can enter phpinfo () to check whether it is successful or not?

Aha, it works well ~

Next, open ZDE, tool menu-> Preferences, select the debugging tab, set the debugging mode to Server, and enter the web Server URL in the Debug Server URL. here, the apache port is 8080, if it is the default port 80, you can omit it. OK. The setting is complete. OK ()


Select tool-> Check the Debug Server connection. in the displayed dialog box, select yes. the connection is successful.


Now, even if our Debug Server has been successfully installed, we will elaborate on how to use Zend Studio to Debug the Server.

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.