PHP debug 环境配置

来源:互联网 发布:淘宝上卖瑕疵化妆品 编辑:程序博客网 时间:2024/06/03 17:42

新手在建立PHP开发调试环境时,经常会遇到xdebug无法成功安装的问题,其实主要原因有两点:

1. xdebug版本和php版本不匹配

2.xdebug和 zend不能同时运行,需要在php.ini中禁掉zend配置

 

针对第一个问题的解决方案,可是使用xdebug官方提供的URL来自动检查与您server php环境相匹配的xdebug版本。

  1.  首先确保web server可以正常运行
  2.  在Browser中查看phpinfo,URL:http://127.0.0.1/phpinfo
  3.  在Browser中右键,查看源代码,拷贝phpinfo的源代码
  4.  打开http://xdebug.org/wizard.php
  5. 将phpinfo源代码全部copy到上面的页面里的输入框中
  6. 最后点击页面最下方的"Analyse my phpinfo() output" 按钮
  7. 最后将会看到我们的系统环境中需要安装哪个版本的php xdebug dll的版本

php.ini文件中关于xdebug的配置如下:

 

[Xdebug]zend_extension="D:/Program Files/phpStudy/PHP5/ext/php_xdebug-2.2.1-5.4-vc9.dll"xdebug.auto_trace = On  xdebug.show_exception_trace = On  xdebug.remote_autostart = On    xdebug.remote_enable = On  xdebug.remote_host = 127.0.0.1  xdebug.remote_port = 9000  xdebug.remote_handler = dbgp    xdebug.profiler_enable = on  xdebug.profiler_output_dir="D:/Program Files/phpStudy/PHP5/log" 


 

原创粉丝点击