MantisBT - Xdebug
View Issue Details
0001040XdebugUsage problems (Wrong Results)public2014-03-19 12:332014-04-29 21:45
atlanto 
derick 
normalminoralways
closedfixed 
Windows 8.1
2.2.4 
2.2.5 
Windows 8.1
5.5.5-5.5.9
0001040: E: Could not connect to client. :-(
Xdebug 2.2.4 doesn't work on Windows8.1. (It works fine on Windows7 though)

Having following directives in php.ini,
>zend_extension = C:\php\php_xdebug-2.2.4-5.5-vc11-nts.dll
>xdebug.remote_enable = On
>xdebug.remote_autostart = On
>xdebug.remote_log = C:\php\xdebug.log
Attempting remote-debugging caused
>Log opened at 2014-03-19 09:15:51
>I: Connecting to configured address/port: localhost:9000.
>E: Could not connect to client. :-(
>Log closed at 2014-03-19 09:15:51

Xdebug 2.2.3 works fine in the same environment.
xdebug_com.c
>int xdebug_create_socket(const char *hostname, int dport)
> actually_connected = getpeername(sockfd, &sa, &size);
This failed. The error code was 10014(WSAEFAULT).
No tags attached.
Issue History
2014-03-19 12:33atlantoNew Issue
2014-03-25 01:58spellerNote Added: 0002773
2014-03-25 15:07miloslavNote Added: 0002774
2014-03-25 16:24derickNote Added: 0002775
2014-03-25 16:49miloslavNote Added: 0002776
2014-04-02 07:52atlantoNote Added: 0002779
2014-04-11 15:57derickNote Added: 0002785
2014-04-12 20:01miloslavNote Added: 0002786
2014-04-24 23:45derickNote Added: 0002789
2014-04-24 23:45derickAssigned To => derick
2014-04-24 23:45derickStatusnew => feedback
2014-04-25 08:34j0intyNote Added: 0002791
2014-04-27 14:33miloslavNote Added: 0002801
2014-04-29 21:45derickNote Added: 0002804
2014-04-29 21:45derickStatusfeedback => closed
2014-04-29 21:45derickResolutionopen => fixed
2014-04-29 21:45derickFixed in Version => 2.2.5
2016-07-31 13:36derickCategoryUsage problems => Usage problems (Crashes)
2016-07-31 13:38derickCategoryUsage problems (Crashes) => Usage problems (Wrong Results)

Notes
(0002773)
speller   
2014-03-25 01:58   
Support this issue!
In addition the xdebug socket connections to port 9000 remain established until PHP or IDE processes are terminated.
Sometimes by unknown conditions debugging started at my system (PHP x64 FCGI, PHPStorm, Win7 x64). But sometimes I can not start it. I see established connections between PHP and PHPStorm processes and message "Could not connect to client. :-(" in xdebug log.
(0002774)
miloslav   
2014-03-25 15:07   
Same issue here. If someone could send me(milkob at gmail.com)/upload pdb file for xdebug 2.2.4 NTS for PHP 5.5, that would be great. I could try to debug this.

Thank you so much!
(0002775)
derick   
2014-03-25 16:24   
Miloslav, you should be able to find that at: http://pecl.php.net/package/xdebug/2.2.4/windows [^]
(0002776)
miloslav   
2014-03-25 16:49   
Derick, Thank you very much!
(0002779)
atlanto   
2014-04-02 07:52   
>xdebug_com.c
>>int xdebug_create_socket(const char *hostname, int dport)
>> actually_connected = getpeername(sockfd, &sa, &size);
>This failed. The error code was 10014(WSAEFAULT).
Should I mention 'size' is not being initialized?
http://msdn.microsoft.com/en-us/library/windows/desktop/ms738533%28v=vs.85%29.aspx [^]
http://www.unix.com/man-page/linux/2/getpeername/ [^]
I'm no longer having this bug since I compiled xdebug with a modification as adding "size=sizeof(sa);".
(0002785)
derick   
2014-04-11 15:57   
Atlanto, I think you're right. I've pushed a patch to github and put some new binaries at http://xdebug.org/files/xdebug-vc9-latest.tgz [^] for you to test.

Miloslav, did you manage to find some time to look at the PDBs and debug this?
(0002786)
miloslav   
2014-04-12 20:01   
Derick, for some reason I'm not able to replicate this with version from http://pecl.php.net/package/xdebug/2.2.4/windows [^] , but I'm able to replicate with the one from http://xdebug.org/download.php [^] . Strange enough version for PHP 5.4 also works for me, just the one for PHP 5.5 is causing the issue.

If you'd be that kind and provide me with the fixed one for PHP 5.5. nts, I'll give it a try.

Thanks!
(0002789)
derick   
2014-04-24 23:45   
Can you please try the latest code from github - on the xdebug_2_2 branch? You can get that with:

git clone https://github.com/xdebug/xdebug.git [^]
cd xdebug
git checkout xdebug_2_2

And then you can run:
phpize
./configure
make && make install

If you are on Windows, you can find new binaries at:
http://xdebug.org/files/xdebug-vc9-latest.tgz [^]
or
http://xdebug.org/files/xdebug-vc11-latest.tgz [^]
(0002791)
j0inty   
2014-04-25 08:34   
Hi

I ran into the same trouble as describe here on my Work Win7 x64 with PHP-nts 5.5.11 x64 and PHP-nts 5.4.27 x86.

Today I replaced the php_xdebug-2.2.4.dll's with the php_debug-2.2.5dev and it work's now like a charm ;)

regards
j0inty
(0002801)
miloslav   
2014-04-27 14:33   
Hi,

I can confirm the fixed version works.

Thank you very much!
(0002804)
derick   
2014-04-29 21:45   
Fixed in 2.2.5, which I will release very shortly.