Trouble with debugging

Hi, I am doing the 30 day evaulation on PHPStorm and I love it so far, does everything I need it to do!
I am trying to get the remote debugging work and have had limited success so far.
My setup ->
Code is on a network share
code is run on a development server

Development server is ubuntu.

php.ini xdebug config
[Xdebug]
zend_extension = "/usr/lib/php5/20090626+lfs/xdebug.so"
xdebug.remote_autostart=1
xdebug.remote_enable=1
;xdebug.remote_connect_back=1
xdebug.remote_host=192.168.1.52
xdebug.remote_port=9123
xdebug.idekey="PHPStorm"

When  I do the debug listener, it works great and as expected. However the  problem is, is that there is multiple developers working on  this, so  the documentation says to enable xdebug.remote_connect_back.
So I uncomment that line, comment the remote_host line.. restart apache2 and then it doesn't work.
The documents say that it gets the IP from _SERVER["REMOTE_ADDR"].
When I run a phpinfo() it says that the REMOTE_ADDR is 192.168.1.1... So our router ip and not 192.168.1.52

Now  I know this isn't a PHPStorm related issue, but unsure where else to  ask. How can I enable remote_connect_back to work properly?
There is myself and another developer who both work on same projects.
I guess I could put the remote_host in the htaccess file, but prefer not to.

4 comments
Comment actions Permalink

Thank you for the info. I am having problems setting it up.
I changed the php.ini
to

zend_extension = "/usr/lib/php5/20090626+lfs/xdebug.so"                
xdebug.remote_autostart=1
xdebug.remote_enable=1
xdebug.remote_host=localhost
xdebug.remote_port=9123            
xdebug.idekey="PHPStorm"

Restart apache2

I start the proxy on my webserver with
python ./pydbgpproxy -i 9124 -d 9123 &

And then in phpstorm go to tools->Xdebug Proxy->Configuration .. Set it up properly (host set to webserver, port set to 9124, IDEKey PHPStormDeveloper1)
Then do tools->Xdebug Proxy->Register IDE
It says Cannot Connect to Xdebug proxy on ..
I know the proxy is running, because since I have auto start on a bunch of stuff is showing up in the log (mainly connection from 127.0.0.1:<random port>. No server with key PHPStorm stopping request. Im asuming I get a bunch of those because autostart is on.

I  have turned off the firewall on my local box.
Any idea why it isn't registering the IDE?

0
Comment actions Permalink

nevermind. I got it working.
I did python ./pydbgpproxy -i 0.0.0.0:9124 -d 0.0.0.0:9123 &
instead of ./pydbgpproxy -i 9124 -d 9123 &
it was binding the port to localhost instead of a wildcard.
And then it worked fine.

0
Comment actions Permalink

Thanks for posting your solution -- good to know even if I'm not using it (but maybe one day I will ...)

0

Please sign in to leave a comment.