32位XP系统下Apache+PHP调试工具Xdebug安装配置教程
来源:互联网 发布:网络语炸鱼是什么意思 编辑:程序博客网 时间:2024/06/05 09:42
记录一下32位XP系统下Apache+PHP调试工具Xdebug安装配置教程
下载:
到http://apache.fayea.com/apache-mirror//httpd/binaries/win32/ 下载httpd-2.2.25-win32-x86-openssl-0.9.8y.msi
到http://windows.php.net/downloads/releases/archives/ 下载 php-5.3.2-Win32-VC6-x86.msi
到http://xdebug.org/download.php 下载PHP 5.3 VC6 TS (32 bit) 文件名字为:php_xdebug-2.1.2-5.3-vc6.dll
Xdebug下载提示:必须要下载与php对应的版本 5.3对5.3,vc6对vc6
安装:
先安装apache,安装时更改路径安装到C:\Apache2.2
然后安装php,安装时更改路径安装到C:\php,安装时选择Apache为服务器,并设置Apache的配置文件所在目录。
然后复制php_xdebug-2.1.2-5.3-vc6.dll到C:\php\ext,并在C:\PHP\php.ini文件末尾添加
[Xdebug]
zend_extension="c:/php/ext/php_xdebug-2.1.2-5.3-vc6.dll"
后面到C:\Apache2.2\conf\httpd.conf文件两处地方更改php网站所在路径
更改 DocumentRoot 选项
更改 <Directory "D:/PHPWEB/Tst">选项
然后在web目录准备phpinfo文件
最后重启Apache,运行phpinfo.php即可见到xdebug配置好
下载:
到http://apache.fayea.com/apache-mirror//httpd/binaries/win32/ 下载httpd-2.2.25-win32-x86-openssl-0.9.8y.msi
到http://windows.php.net/downloads/releases/archives/ 下载 php-5.3.2-Win32-VC6-x86.msi
到http://xdebug.org/download.php 下载PHP 5.3 VC6 TS (32 bit) 文件名字为:php_xdebug-2.1.2-5.3-vc6.dll
Xdebug下载提示:必须要下载与php对应的版本 5.3对5.3,vc6对vc6
安装:
先安装apache,安装时更改路径安装到C:\Apache2.2
然后安装php,安装时更改路径安装到C:\php,安装时选择Apache为服务器,并设置Apache的配置文件所在目录。
然后复制php_xdebug-2.1.2-5.3-vc6.dll到C:\php\ext,并在C:\PHP\php.ini文件末尾添加
[Xdebug]
zend_extension="c:/php/ext/php_xdebug-2.1.2-5.3-vc6.dll"
后面到C:\Apache2.2\conf\httpd.conf文件两处地方更改php网站所在路径
更改 DocumentRoot 选项
更改 <Directory "D:/PHPWEB/Tst">选项
然后在web目录准备phpinfo文件
最后重启Apache,运行phpinfo.php即可见到xdebug配置好
参考:http://www.cnblogs.com/qiantuwuliang/archive/2011/01/23/1942382.html
PhpStorm官方指引:http://www.jetbrains.com/phpstorm/webhelp/configuring-xdebug.html#d26093e331
Configuring XDebug
Next | See Also | Get PrintableConfiguring the XDebug tool involves:
- Downloading and installing the XDebug debugging engine
- Enabling XDebug integration with the PHP engine
- Checking the XDebug installation
- Integrating XDebug with PhpStorm
Downloading and installing the XDebug debugging engine
- Download the XDebug extension compatible with your version of PHP and save it in the php/ folder.
Note
The location of the php/ folder is defined during the installation of the PHP engine.
Tip
If you are using an AMP package, the XDebug extension may be already installed. Follow the instructions in the xdebug.txt.
Enabling XDebug integration with the PHP engine
- Locate and open the active php.ini file.
Tip
To find out which php.ini file is active, create and run a test file with phpinfo(), then search for the Loaded Configuration File.
- To disable the Zend optimizer, which blocks XDebug, remove the [Zend] section or mark it as comment in the php.ini file:
[Zend]zend_extension_ts = "<path to ZendExtensionManager.dll>"zend_extension_manager.optimizer_ts = "<path to Zend Optimizer>"zend_optimizer.enable_loader = 0zend_optimizer.optimization_level=15zend_optimizer.license_path =Local Variables:tab-width: 4End:
- To enable XDebug, locate the [XDebug] section in the php.ini file and update it as follows:
- For a thread-safe PHP engine, version 5.2:
[XDebug]zend_extension_ts="<path to php_xdebug.dll>"xdebug.remote_enable=truexdebug.remote_port="<the port for XDebug to listen to>" (the default port is 9000)xdebug.profiler_enable=1xdebug.profiler_output_dir="<AMP home\tmp>"
- For a non-thread-safe PHP engine, version 5.2:
[XDebug]zend_extension_nts="<path to php_xdebug.dll>"xdebug.remote_enable=truexdebug.remote_port="<the port for XDebug to listen to>" (the default port is 9000)xdebug.profiler_enable=1xdebug.profiler_output_dir="<AMP home\tmp>"
- For any PHP engine, version 5.3 and higher:
[XDebug]zend_extension="<path to php_xdebug.dll>"xdebug.remote_enable=1xdebug.remote_port="<the port for XDebug to listen to>" (the default port is 9000)xdebug.profiler_enable=1xdebug.profiler_output_dir="<AMP home\tmp>"
- For a thread-safe PHP engine, version 5.2:
- To enable multiuser debugging via Xdebug proxies, locate the xdebug.idekey setting and assign it a value of your choice. This value will be used to register your IDE on Xdebug proxy servers.
- Save and close the php.ini file.
Checking the XDebug installation
- Open the XDebug checker.
- Enter the output of the phpinfo().
Integrating XDebug with PhpStorm
- Open the Project Settings and click PHP.
- On the PHP page that opens, click the Browse button next to the Interpreter drop-down list.
- In the Interpreter dialog box that opens, choose XDebug from the Debugger drop-down list.
- Define the XDebug behaviour. Click Debug under the PHP node. On the Debug page that opens, specify the following settings in the XDebug area:
- In the Debug Port text box, appoint the port through which the tool will communicate with PhpStorm. This must be exactly the same port number as specified in the php.ini file:
xdebug.remote_port = <port_number>
By default, Xdebug listens on port 9000.
- To have PhpStorm accept any incoming connections from XDebug engines through the port specified in the Debug port text box, select the Can accept external connections check box.
- To have addresses of variables shown during a debugging session, select the Show variables addresses check box.
- To have PhpStorm apply a workaround to overcome a known XDebug on FreeBSD crash issue, select the Enable workaround for [XDebug on FreeBSD crash] check box.
- In the Debug Port text box, appoint the port through which the tool will communicate with PhpStorm. This must be exactly the same port number as specified in the php.ini file:
- To have XDebug stop as soon as connection between it and PhpStorm is established (instead of running automatically until the first breakpoint is reached), turn on the option on the main menu.
See Also
Procedures:
- Configuring PHP Development Environment
- Creating and Editing Run/Debug Configurations
- Multiuser Debugging via XDebug Proxies
- Configuring Zend Debugger
Reference:
- Debug
- PHP
External Links:
- http://confluence.jetbrains.com/display/PhpStorm/Xdebug+Installation+Guide
- http://www.xdebug.org/
Web Resources:
- Discussion Forum
- Issue Tracker
0 0
- 32位XP系统下Apache+PHP调试工具Xdebug安装配置教程
- PHP调试工具Xdebug安装配置教程
- PHP调试工具Xdebug安装配置教程
- PHP调试工具Xdebug安装配置教程
- PHP调试工具Xdebug安装配置教程
- PHP调试工具Xdebug安装配置教程
- PHP调试工具Xdebug安装配置教程
- PHP调试工具Xdebug安装配置教程
- PHP调试工具Xdebug安装配置教程
- PHP调试工具Xdebug安装配置教程
- PHP调试工具Xdebug安装配置教程
- PHP调试工具xdebug安装调试教程
- PHP调试利器Xdebug安装配置教程
- PHP调试工具Xdebug安装配置
- window下安装php调试工具xdebug
- [PHP调试工具]XDebug配置
- PHP配置调试工具XDebug
- PHP配置调试工具XDebug
- jsp c:foreach 说明
- python if 多条件和获取字符串长度方法
- C++之继承和动态内存分配
- 怎样注册iis以及iis和.net framework的安装顺序说明
- 第一个shell script的编写
- 32位XP系统下Apache+PHP调试工具Xdebug安装配置教程
- Android 如何在Eclipse中查看Android API源码 及 support包源码
- wifi破解教程
- java学习笔记 第一篇 基础知识
- 浅谈设计层次的抽象类和接口异同
- subprocess创建守护进程
- C#之接口定义与实现
- java jdk1.7及JDBC驱动桥环境变量的配置(水一贴)
- Java正则表达式教程