PHP xdebug only on localhost?

I'm trying to debug php pages on a remote server. But it will not work as supposed. I tried out various configurations and settings. Everything works fine when the http Server runs on the local machine. But the debugger is waitng for connection on port 9000 when trying to connect to a webserver in my local network. When trying to connect with an other Xdebug client like Eclipse everthing works fine.

But one after the other (the setup I'm using):
The server (e.g. local ip is running with a WAMP installation (Apache/2.2.11 (Win32) PHP/5.2.6 and DOCUMENT_ROOT    D:/opt/wamp/www/ )
The client (e.g. local ip Intellij 9.0.1, Windows XP, Content Root (e.g. C:\dev\www\ , with at least one file phpinfo.php)

php.ini on


PHP setting in IntelliJ

Server Root:
XDebug port: 9000
PHP directory: c:\php\ph5.2.6 (a local php directory)

Run/Debug config: (e.g. phpinfo.php)

Web path:
Browser: FF
Debug: Open web page in browser....
Path Mappings:
Local Client    Local Server             
C:\dev\www\  => D:\opt\wamp\www

I also tried to set a specific idekey in php.ini and in "wait for xdebug..." in the Run/Debug Configurations, with and without mapping, with auto mapping and so on... but allways the same problem: IDEA is still waiting for conection on port 9000.
Additionally I added the appropriate category to log.xml. -> no exceptions in the log...

So what's the/my mistake?

Thanks in advance

Comment actions Permalink

Hello Max,

Thanks for the detailed description,

This is usually caused by wrong client IP specified at server's php.ini, but this is not the case since you can successfully debug in Eclipse running on the client machine.
Does the 'phpinfo.php' web page show up in the browser at all?

Could you please attach the Web IDE log with

  <category name="com.jetbrains.php.debug">
    <priority value="DEBUG"/>

part added to the log.xml (as you likely already done ).

Also, XDebug writes it's own log at the server, configured by


This one may also help.


Comment actions Permalink

Hello Kirill,

yes the webpage is displayed in the browser at all. I already inserted the category in the log.xml. But there are no interesting entries, solely:

2010-02-07 12:15:39,390 [ 332797]   INFO - bug.dbgp.DbgpConnectionManager - Debug session IDEA1 started
2010-02-07 12:15:39,390 [ 332797]   INFO - nection.ServerSocketConnection - Starting to listen on port 9000
2010-02-07 12:15:39,390 [ 332797]   INFO - - Starting debug session: IDEA1
2010-02-07 12:15:39,406 [ 332813]  DEBUG - ains.php.debug.PhpDebugProcess - Opening URL:

No xdebug.log will be created on server at this time!

Looking at eclipse - the settings are nearly the same (I guess):

PHP Debugger XDebug  (port 9000)
- Path on Server: d:\opt\wamp\www
- Localpath: (Projectpath: /www, or Filepath : C:\dev\www\)

Eclipse uses this url form debugging:

Now there's the expected xdebug.log on server starting with....

-> <init xmlns="urn:debugger_protocol_v1" xmlns:xdebug="" fileuri="file:///D:/opt/wamp/www/phpinfo.php" language="PHP" protocol_version="1.0" appid="2472" idekey="ECLIPSE_DBGP"><engine version="2.0.5"><![CDATA[Xdebug]]></engine><author><![CDATA[Derick Rethans]]></author><url><![CDATA[]]></url><copyright><![CDATA[Copyright (c) 2002-2009 by Derick Rethans]]></copyright></init>

I tried out Xdebug 2.1.0beta, too. There's a new feature implemented:

Type: boolean, Default value: 0, Introduced in Xdebug 2.1 If enable, the xdebug.remote_host setting is ignored and Xdebug will try to connect to the client that made the HTTP request. It checks the $_SERVER['REMOTE_ADDR'] variable to find out which IP address to use. Please note that there is no filter available, and anybody who can connect to the webserver will then be able to start a debugging session.

but as you can imagine - no success...
...other suggestions? Has anybody else succeeded to get the debugger run with the exception of localhost?

Best regards,

Comment actions Permalink

Hello Max,

What I see is that for some reason Xdebug is not triggered when the page is opened by IDEA.

Also please check that 'XDEBUG_SESSION' cookie is set when you open the page using IDEA and Eclipse.

Also pleaae choose the option 'Wait for Xdebug connection with ide key', specify there an Eclipse' one: 'ECLIPSE_DBGP' and try opening the page manually:

Does debug start this way?


Comment actions Permalink

Thank you for the quick reply.

No I'm sorry, but this is still not the solution (workaround). I changed the key manually in the run/debug config to ECLIPSE_DBGP, started a browser (tried with ff and ie) - no success. It really drives me to despair.
Interestingly there's no Xdebug session cookie when using Eclipse. It's only available when IDEA tries to connect.

Removing or changing the xdebug.remote_host config in php.ini I get the expected result: the debugger doesn't work anymore ;-)

Comment actions Permalink

I found it! I found it! I found it!

The windows firewall caused the unnecessary stress. IDEA was not allowed to connect to.
I apologise for my mistakes. What a mess!

Thank you for your support, Kirill


Please sign in to leave a comment.