WordPress.org

Make WordPress Core

Changeset 11759


Ignore:
Timestamp:
07/31/2009 09:40:16 AM (9 years ago)
Author:
markjaquith
Message:

Force IPv4 (127.0.0.1) when connecting to localhost, as many dev environments are not set up to serve on IPv6 (::1). props dd32. fixes #10045

File:
1 edited

Legend:

Unmodified
Added
Removed
  • trunk/wp-includes/http.php

    r11758 r11759  
    630630            }
    631631        }
     632
     633        //fsockopen has issues with 'localhost' with IPv6 with certain versions of PHP, It attempts to connect to ::1,
     634        // which fails when the server is not setup for it. For compatibility, always connect to the IPv4 address.
     635        if ( 'localhost' == strtolower($fsockopen_host) )
     636            $fsockopen_host = '127.0.0.1';
    632637
    633638        // There are issues with the HTTPS and SSL protocols that cause errors that can be safely
Note: See TracChangeset for help on using the changeset viewer.