View Issue Details
ID | Project | Category | View Status | Date Submitted | Last Update |
---|---|---|---|---|---|
0001614 | Xdebug | Step Debugging | public | 2019-01-29 13:12 | 2019-02-19 16:21 |
Reporter | luchuanbaker | Assigned To | derick | ||
Priority | normal | Severity | minor | Reproducibility | always |
Status | resolved | Resolution | no change required | ||
Platform | Apache24 + php + xdebug + Idea | OS | Windows | OS Version | 10 |
Product Version | 2.6.1 | ||||
Summary | 0001614: Remote address localhost is ::1 or 127.0.0.1 | ||||
Description | When debugging with http://localhost, xdebug can not deal with localhost properly, as the log: Is there a config that can convert localhost to 127.0.0.1 as IPv4, not ::1 as IPv6, because idea create the debug server by IPv4 that is 127.0.0.1... so the error happens..... The problem can be resolved easily by just replacing http://localhost with http://127.0.0.1..... but I hope there is a config.... | ||||
Tags | No tags attached. | ||||
Operating System | |||||
PHP Version | 7.1.25-7.1.29 | ||||
|
Could you show the whole section of the log that does the connection? From the part where it says: Log opened at 2019-01-29 14:50:58 to where it says: Log closed at 2019-01-29 14:50:58 And please don't leave out anything. Secondly, can you provide the raw HTTP request and response headers, with a tool such as Chrome's or Firefox's dev tools? |
|
When visit http://localhost/, xdebug can not work properly, the log is: When visit http://127.0.0.1/, xdebug work properly, and the log is: The different is ip, when visit localhost the ip is ipv6 while 127.0.0.1 is ipv4 The php plugin of idea binds socket using ipV4, when I run So if xdebug connect to ::1:9000 (IPv6), it can not connect successfully, but is connect to 127.0.0.1:9000 (IPv4), it is OK. I have tried to change the config in php.ini: but it has no effect... or make the config |
|
You wrote:
That makes sense, as this setting is ignored when you have xdebug.remote_connect_back turned on. So turning off remote_connect_back should solve this problem. Xdebug uses the Operating System's mechanisms (getaddrinfo()) to convert and Xdebug does look at all returned matches for a specific name. On correct setups, that would include the IPv4 and IPv6 variants. However, in:
We see that your browser doesn't send over localhost in the HTTP headers, but instead uses "::1" which means that Xdebug can't do its own name resolving from "localhost" to both IPv4 and IPv6 variants. In any case, turning off xdebug.remote_connect_back (setting it to =0) should do the trick for you. |
|
is this now resolved for you? |
|
yes, thanks... |
|
Thanks for letting me know. I'll close this issue then. |
Date Modified | Username | Field | Change |
---|---|---|---|
2019-01-29 13:12 | luchuanbaker | New Issue | |
2019-01-29 14:52 | derick | Note Added: 0004850 | |
2019-01-29 14:52 | derick | Assigned To | => derick |
2019-01-29 14:52 | derick | Status | new => feedback |
2019-01-30 02:10 | luchuanbaker | Note Added: 0004853 | |
2019-01-30 02:10 | luchuanbaker | Status | feedback => assigned |
2019-02-01 15:21 | derick | Note Added: 0004858 | |
2019-02-01 15:21 | derick | Status | assigned => feedback |
2019-02-12 19:24 | derick | Note Added: 0004900 | |
2019-02-15 04:25 | luchuanbaker | Note Added: 0004911 | |
2019-02-15 04:25 | luchuanbaker | Status | feedback => assigned |
2019-02-19 16:21 | derick | Status | assigned => resolved |
2019-02-19 16:21 | derick | Resolution | open => no change required |
2019-02-19 16:21 | derick | Note Added: 0004915 | |
2020-03-12 16:33 | derick | Category | Remote Debugging => Step Debugging |