已经很久没有用过PHP了,今天准备写一个文件复制的脚本,想用PHP来写,途中遇到了很多问题,因此准备使用phpstorm调试一下,这就须要PHP中安装xdebug。 php
我比较习惯在Windows里面直接搞一个WAMP包,比较方便,而后在path里面设置一下,让其能够直接在cmd中使用mysql,php等。 mysql
启动Wamp Server,看了一下phpinfo,如图: web
因为个人系统是32位的,PHP版本5.3.3,使用了VC6编译的,就直接到http://www.xdebug.org/download.php下载了http://www.xdebug.org/files/php_xdebug-2.1.0-5.3-vc6.dll 。 sql
下载后把这个dll文件放到了php的ext目录下,而后在php.ini中配置了一下,以下: shell
[Xdebug] zend_extension_ts="E:/program/learning/PHP/wamp3/bin/php/php5.3.3/ext/php_xdebug-2.1.0-5.3-vc6.dll" xdebug.auto_trace=on xdebug.collect_params=on xdebug.collect_return=on xdebug.trace_output_dir="c:/webserver/php5/debuginfo" xdebug.profiler_enable=on xdebug.profiler_output_dir="c:/webserver/php5/debuginfo"
这个配置我是参照了:http://www.jb51.net/article/24199.htm phpstorm
悲剧的是修改了N次都不成功,后面google了一下,参照了http://blog.why100000.com/?p=835,终于解决了这个问题,原来在PHP5.3中已经不能使用zend_extension_ts,而使用zend_extension,修改成以下: google
[Xdebug] zend_extension="E:/program/learning/PHP/wamp3/bin/php/php5.3.3/ext/php_xdebug-2.1.0-5.3-vc6.dll" xdebug.auto_trace=on xdebug.collect_params=on xdebug.collect_return=on xdebug.trace_output_dir="c:/webserver/php5/debuginfo" xdebug.profiler_enable=on xdebug.profiler_output_dir="c:/webserver/php5/debuginfo"而后在phpinfo.php中查看,能够了!
感受有时候网上找的资料也是埋的一个大坑啊,谨记了! spa