Edit report at http://bugs.php.net/bug.php?id=51079&edit=1

 ID:               51079
 Updated by:       paj...@php.net
 Reported by:      tony at marston-home dot demon dot co dot uk
 Summary:          fsockopen will not work on 'localhost'
 Status:           Open
 Type:             Bug
 Package:          Sockets related
 Operating System: win32 only - Windows XP
 PHP Version:      5.2.12

 New Comment:

Mysql is not related to this problem, IPv6 is not supported and you have
to apply one of the solutions described here or one of the other
numerous reports about mysql and IPv6.


Previous Comments:
------------------------------------------------------------------------
[2010-03-10 09:43:16] thijsputman at gmail dot com

I can confirm that the problem is not present in PHP 5.3.0, but _is_
present in PHP 5.3.2... 



It appears the mysql(i) extension is suffering from the same issue: I
just spend a couple hours going through various versions of phpMyAdmin
(which after upgrading from 5.3.0 simply timed out with a blank page)
until discovering this issue. Changing "localhost" into "127.0.0.1" did
trick.



Tested using 5.3.2 (VC9 NTS) on Windows Server 2008 (x64). On a side
note, both Firefox and MS telnet don't have any issues connecting to
localhost over IPv4.

------------------------------------------------------------------------
[2010-02-19 14:42:07] tony at marston-home dot demon dot co dot uk

-Status: Feedback
+Status: Open

I have tried 5.2.13RC2, but it produces the same error. I have not tried
5.3.2RC2 as I do not have an error with 5.3.0 (which may be because my
copy of 5.3.0 does not have IPv6 support enabled).

------------------------------------------------------------------------
[2010-02-19 12:51:20] paj...@php.net

-Status: Bogus
+Status: Feedback

Have you tried with 5.2.13RC2 and 5.3.2RC2?

------------------------------------------------------------------------
[2010-02-19 10:58:02] tony at marston-home dot demon dot co dot uk

Rasmus, before you post a comment like that I suggest you first make
yourself aware of the facts.

(1) I am not the only one who has reported it, see
http://bugs.php.net/bug.php?id=47437 where the suggested "fix" was to
disable IPv6 support in Windows.

(2) Nobody has ever said that they cannot reproduce the problem.



This problem exists in Windows XP with IPv6 support enabled, and with
PHP 5.2.12 also with IPv6 support enabled.



None of my web browsers (IE, Firefox, Opera, Safari) has a problem with
resolving 'localhost' to 127.0.0.1



gethostbyname('localhost') returns '127.0.0.1' without any problem.



The CURL extension can send requests to 'localhost' without a problem.



I have another Windows XP PC with IPv6 support enabled, running PHP
5.3.0 with IPv6 support disabled, and fsockopen() will accept
'localhost' without falling over.



So why can't fsockopen() in 5.2.12 deal with 'localhost', only
'127.0.0.1'?



Do NOT tell me that this is a Windows XP issue and that I should disable
IPv6 support. IPv4 and IPv6 are designed to run alongside each other and
are NOT mutually exclusive. The only function on my PC that has a
problem with that is fsockopen(), so stop procrastinating and FIX IT!

------------------------------------------------------------------------
[2010-02-18 17:44:10] ras...@php.net

You are going to have to debug it yourself.  Nobody has been able to 

reproduce your problem and you are the only one who has reported it.  

We can't fix something we can't see.

------------------------------------------------------------------------


The remainder of the comments for this report are too long. To view
the rest of the comments, please view the bug report online at

    http://bugs.php.net/bug.php?id=51079


-- 
Edit this bug report at http://bugs.php.net/bug.php?id=51079&edit=1

Reply via email to