dongsonglian7303 2012-10-03 00:29
浏览 48
已采纳

如何使用Eclipse和XAMPP在Ubuntu 12.04上设置PHP调试?

I've been trying to configure this for quite some time now but I can't get it running properly. Done so far:

  • Downloaded the latest version of xampp and moved it to /opt/lampp
  • Installed php5-xdebug with apt-get
  • Changed implicit_flush to On in /opt/lampp/etc/php.ini
  • Added the following lines to the end of the ini file:

    [xdebug]
    zend_extension="/usr/lib/php5/20090626/xdebug.so"
    xdebug.remote_enable=1
    xdebug.remote_handler="dbgp"
    xdebug.remote_port=9000
    xdebug.remote_host="localhost"
    

I've made sure to restart apache, but I still don't get an xdebug-section when showing phpinfo();

I think that Eclipse is configured properly, but I can't know for sure until I get xdebug to run.

Please help, all suggestions are very welcome!

Edit:

Here is the output of phpinfo(): http://www.pasteall.org/35930

Update:

I've downloaded Xampp 1.8.1 (I had previously xampp 1.8.0) to /opt/lampp and added the appropriate development files. I have both compiled Xdebug myself according to the guide at http://xdebug.org/wizard.php and installed xdebug through /opt/lampp/bin/pecl.

Now my php.ini looks like this:

zend_extension = "/opt/lampp/lib/php/extensions/no-debug-non-zts-20100525/xdebug.so"
xdebug.remote_enable = 1
xdebug.remote_port = 9000
xdebug.remote_host = "localhost"
xdebug.remote_handler = "dbgp"

I don't know what to do, http://xdebug.org/wizard.php still reports that Xdebug isn't installed. Could it be a permission issue? Currently the permissions for the extensions are as follows:

-rwxr-xr-x 1 niklas niklas  88376 Sep 30 10:43 interbase.so
-rwxr-xr-x 1 niklas niklas 184920 Sep 30 10:43 oci8.so
-rwxr-xr-x 1 niklas niklas 118592 Sep 30 10:43 pgsql.so
-rwxr-xr-x 1 niklas niklas 830886 Oct 10 15:10 xdebug.so

Should they be owned by someone else? Must I enable any additional options in php.ini? This is my current output of phpinfo(): http://www.pasteall.org/36135

  • 写回答

4条回答 默认 最新

  • doudou5101 2012-10-11 17:15
    关注

    Since there is no sign of why it isn't working I've given up on xampp and just installed a regular lamp-server with xdebug through apt-get. I disabled mysql and apache2 from starting during boot so that they are not running if I don't want them. Here is a very simple tutorial on how to enable xdebug-debugging with Eclipse: http://www.web-brainz.co.uk/Xdebug

    The other answers will surely be the most fitting for other users though they unfortunately didn't fix my issue. Thank you very much for help!

    本回答被题主选为最佳回答 , 对您是否有帮助呢?
    评论
查看更多回答(3条)

报告相同问题?

悬赏问题

  • ¥15 求差集那个函数有问题,有无佬可以解决
  • ¥15 【提问】基于Invest的水源涵养
  • ¥20 微信网友居然可以通过vx号找到我绑的手机号
  • ¥15 寻一个支付宝扫码远程授权登录的软件助手app
  • ¥15 解riccati方程组
  • ¥15 display:none;样式在嵌套结构中的已设置了display样式的元素上不起作用?
  • ¥15 使用rabbitMQ 消息队列作为url源进行多线程爬取时,总有几个url没有处理的问题。
  • ¥15 Ubuntu在安装序列比对软件STAR时出现报错如何解决
  • ¥50 树莓派安卓APK系统签名
  • ¥65 汇编语言除法溢出问题