Pls help with DBG! Argh! |
|
When debugging, the PHP DBG extension (running as part of PHP in your webserver) connects to the DBG Listener which is running at your machine at port 7869.
Obviously, the DBG extension tries to find the listener at 127.0.0.1. There might be two problems here, which I cannot clearly distinct from your post. Please check both. 1. The listener might not be listening at 127.0.0.1, but is listening on some other address, e. g. the IP address of a local network interface. You can find out by running "netstat -an" at a command prompt. If so, the problem is that when you're requesting some script from Apache, the debugger will by default connect to "clienthost", that is, the address it sees as the REMOTE_HOST (also available in PHP as a $_SERVER variable). Now if running Apache locally (127.0.0.1), REMOTE_HOST will also be 127.0.0.1, which mismatches if the listener is bound to some other address. The "real" solution would be to get the debugger listening on "all" local addresses. The "workaround" is to start debugging by requesting the script in a browser and adding the URL parameter "?DBGSESSID=1@[the_address_the_listener_is_listening_at]". 2. Even if 1. is set up correctly, the hosts_allow setting in php.ini might prohibit a connect to the listener address. This is a security feature, as you can download the plain scripts through the debugger. So you can setup dbg only to connect to debug listeners at addresses you "trust". For your setup, you should make sure that both 127.0.0.1 and your local NIC address are among the "hosts_allow"ed. (Don't forget to restart apache after that, if necessary ). Note that this setting does not tell the Apache-side dbg extension to which address to connect (that is taken from the DBGSESSID request parameter), but only which addresses are allowed at all. As a sidenote: On *nix systems (which is not the case here) the DBG extension also checks the tcpwrappers /etc/hosts.allow file; this might seem a little strange as this file usually applies to "servers", that is, it is consulted whenever some external machine tries to connect to the local system. In the DBG case, the connection is made from the webserver to the listener, that is, the webserver is the _client_, the listener is the _server_ at that moment. So hosts.allow is used the "other way round" |
||||||||||||
|
|
Thanks for that...
I'm not sure what happened but I started it back up this morning and read your post and changed the hosts_allow back to 127.0.0.1 and changed the Debugger settings back to localhost from the default clienthost (which I had done all this before) and now it works! Very strange... Thanks again for your time! |
||||||||||||
|
Pls help with DBG! Argh! |
|
||
Content © NuSphere Corp., PHP IDE team
Powered by phpBB © phpBB Group, Design by phpBBStyles.com | Styles Database.
Powered by
Powered by phpBB © phpBB Group, Design by phpBBStyles.com | Styles Database.
Powered by