Xdebug configuration with PHP fastcgi and eclipse?

喜欢而已 提交于 2019-11-30 19:31:07
valk

What Beau said is correct (couldn't vote since I'm new!).

Generally, addging to /etc/php5/cgi/php.ini (or locate php.ini) the lines like

zend_extension = /PATH_TO/xdebug.so   ## <-- NOTE the absolute path, not relational (For ex on Windows: "C:\nginx-1.9.13\php\ext\php_xdebug-2.6.0RC2-7.0-vc14-nts.dll")
xdebug.remote_enable = on
xdebug.remote_handler = dbgp
xdebug.remote_host = localhost
xdebug.remote_port = 9900        ## <-- Yours will be probly 9000 or other..

does the job.

So after the change,

./php-fastcgi stop
./php-fastcgi start

This worked for me.

xdebug and FastCGI use the same default port (9000). Change the port of XDebug in your php.ini file like this:

xdebug.remote_port=9001

and update your IDE settings to use 9001.

Try restarting your php. Because you have php-fastcgi, restarting nginx doesn't seem to do it. When I rebooted my whole server the change took effect.

protect4you

I had the same problem and solved it.
In file /etc/php5/apache2/php.ini add:

[xdebug] xdebug.remote_enable=On
xdebug.remote_autostart=off
xdebug.remote_handler=dbgp
xdebug.remote_host=localhost
xdebug.remote_port=9000
xdebug.remote_mode=req


In file /etc/php5/cli/php.ini add:

zend_extension=/usr/lib/php5/20060613/xdebug.so
xdebug.remote_enable=On
xdebug.remote_autostart=off
xdebug.remote_handler=dbgp
xdebug.remote_host=localhost
xdebug.remote_port=9000
xdebug.remote_mode=req


Restart Apache:

sudo service apache2 restart

Problem in solution is "xdebug.remote_autostart = on". If you set in file config "xdebug.remote_autostart = on". This will force Xdebug to start a debug session for every request that is done on this server, without having to specify in the request that a debug session is wanted.

You need change

"xdebug.remote_autostart = off"

And restart web service. In this example is Apache.

You can read more here: http://doc.waterproof.fr/phpedit/debugging_profiling/configuration/debugger_with_xdebug

GoodLuck!

易学教程内所有资源均来自网络或用户发布的内容,如有违反法律规定的内容欢迎反馈
该文章没有解决你所遇到的问题?点击提问,说说你的问题,让更多的人一起探讨吧!