In fact, the debugging functions of Zend Studio (hereinafter referred to as "zde") are divided into internal debugging and remote debugging. Internal debugging is performed using zde's built-in PHP (four or five versions ). Code Preliminary debugging focuses on remote debugging because it can fully 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 = <ip_addresses>
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_1_x_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.