Xdebug: Validation failed: HEAD method failed for ...

Hi,

I'm just evaluating PhpStorm. I was using netbeans for quite a while but I'm annoyed by the indexing problem of netbeans. So PhpStorms seem to be an interesting alternative.

But I ran into troubles with the debugger. I set up xdebug with netbeans. But with PhpStorm I always get an error

Validation failed: HEAD method failed for http://myserver:8085/correct/directories/PhpStorm-1d586c9b-f50e-4f6d-a271-97169546103c.php?port=9049&sessionId=1d586c9b-f50e-4f6d-a271-97169546103c

The start of the url is correct. But instead of mypage.php I get this PhpStorm-1d586c9b-f50e-4f6d-a271-97169546103c.php

After ignoring this message I can step through my source code. But when reaching the end of the php-file there's no output in the browser.

(I had to switch the port to 9049 because on port 9000 there was some other service listing.)
My php.ini contains this

xdebug.remote_enable=1
xdebug.remote_handler=dbgp
xdebug.remote_mode=req
xdebug.remote_host=192.168.192.1
xdebug.remote_port=9049
;xdebug.idekey=netbeans-xdebug
xdebug.idekey=PhpStorm1

Any ideas what I'm doing wrong?

TIA,
Jerry

2 comments
Comment actions Permalink

Hello Jery,

But with PhpStorm I always get an error

This message is reported by PhpStorm when it's trying to validate Xdebug setup. If you can successfully debug your pages, you can simply turn off validation by unchecking 'Validate Xdebug configuration before debug' checkbox at run configuration dialog (you can do it for template configuration, so it is not checked by default).

When checking Xdebug configuration on server, PhpStorm uploads and executes (by retrieving via HTTP) a diagnostic script. For isolation reason, it's name is randomly generated. Your message says that PhpStorm failed to retrieve a certain URL for some reason (i.e. unsiccificent permissions for the server to access the file - you can check this by trying to open parent folder URL in your browser:  http://myserver:8085/correct/directories).

We're going to improve this unclear message soon: WI-1965, WI-2320.

But when reaching the end of the php-file there's no output in the browser.

What Xdebug version are you using? 2.1.0 is known for crashing Apache process when the debug session ends, and no output is sent as the result (see WI-1873). Can you confirm this with server logs?

Regards,
Kirill

0
Comment actions Permalink

Hi Kirill,

thank you for your quick answer.

If you can successfully debug your pages, you can simply turn off validation by unchecking 'Validate Xdebug configuration before debug' checkbox at run configuration dialog (you can do it for template configuration, so it is not checked by default).

okay. That's fine with me.

What Xdebug version are you using? 2.1.0 is known for crashing Apache process when the debug session ends, and no output is sent as the result (see WI-1873). Can you confirm this with server logs?

Yes, I'm using xdebug-2.1.0beta3. In the server logs I can find many  lines like this
  [notice] child pid xxxx exit signal Segmentation fault (11)

I haven't changed anything with xdebug because it was a pain to get it running with netbeans and I was happy with it. But with your tip I'll try the svn trunk.

thanks a lot,
Jerry

0

Please sign in to leave a comment.