Reputation: 3990
I am using Netbeans to debug PHP. I dont have access to php.ini
so I use .htaccess
:
php_value xdebug.remote_host "localhost"
php_value xdebug.idekey "netbeans-xdebug"
php_flag xdebug.remote_autostart Off
php_flag xdebug.remote_enable On
php_value xdebug.remote_port 9000
php_value xdebug.remote_handler dbgp
php_flag xdebug.profiler_enable on
php_flag xdebug.remote_connect_back On
php_flag xdebug.extended_info On
sub.mydomain.com
runs with port 8080 and 8090. I have previously used xdebug with Eclipse on this server.
The sub.mydomain.com
server 's phpinfo()
lists xdebug as installed together with the settings above:
Zend Engine v2.3.0, Copyright (c) 1998-2011 Zend Technologies
with Xdebug v2.1.3, Copyright (c) 2002-2012, by Derick Rethans
In Netbeans I have configured the "properties" and "run configuration" entries and port and id match also (9000, netbeans-xdebug).
There are many developers on sub.mydomain.com
, might this be a problem if anyone uses port 9000?
Still if I run "debug" in Netbeans, there comes "Waiting for connection" forever.
What do I have to do?
Edit: fixed to localhost
Upvotes: 1
Views: 3339
Reputation: 3990
I have managed to start the debugger with the following config:
php_value xdebug.remote_host "192.168.1.149"
php_value error_reporting 22527
php_flag xdebug.remote_autostart Off
php_flag xdebug.remote_enable On
php_value xdebug.remote_port 9009
php_value xdebug.remote_handler dbgp
php_value xdebug.remote_log "..."
php_flag xdebug.profiler_enable off
php_flag xdebug.extended_info On
php_flag xdebug.coverage_enable On
php_value error_log "..."
Upvotes: 1
Reputation: 36774
This is wrong:
php_value xdebug.remote_host "sub.mydomain.com"
the xdebug.remote_host setting needs to contain the IP of the machine that has your IDE on it. This of course also means that the machine running PHP/Xdebug needs to be able to connect to that IP address. This is also documented at http://xdebug.org/docs/remote#communication
Upvotes: 0