Title: php_network_getaddresses: getaddrinfo failed
Last modified: August 21, 2016

---

# php_network_getaddresses: getaddrinfo failed

 *  [Deatheye](https://wordpress.org/support/users/deatheye/)
 * (@deatheye)
 * [12 years, 11 months ago](https://wordpress.org/support/topic/php_network_getaddresses-getaddrinfo-failed/)
 * Hi
    I was trying to run wordpress on IIS 8 PHP 5.4.X mySQL 5.2.x
 *     ```
       Warning: mysql_connect(): php_network_getaddresses: getaddrinfo failed: No such host is known. in ...\wwwroot\wordpress\wp-includes\wp-db.php on line 1038
   
       Warning: mysql_connect(): php_network_getaddresses: getaddrinfo failed: No such host is known. in ...\wwwroot\wordpress\wp-includes\wp-db.php on line 1038
       ```
   
 * The only things I found about this error seem to hint at DNS Resolution Errors
   or generell Access Problem to the database.
 * I’ve wrote a Little php scryipt manually that Access the DB and get’s some data
   out of a table I created manually and put some data in there to test the Connection.
   The PHP file showed me the table data without a Problem using the same DB and
   user from the same Server, even put it in the same Directory where the wordpress
   files are.
 * Doesn’t make a diffeerence if I put an IP or the host Name into the Connection
   configuration file.
 * I assume it’s somehow a Problem with IIS8 or the PHP Installation Since ist also
   Happening with other applications I tried out.
    Any Ideas where / what to look
   for? The Webserver has 2 NICs, one for public Access and one for the internal
   Network that connects to the Database.

Viewing 1 replies (of 1 total)

 *  Thread Starter [Deatheye](https://wordpress.org/support/users/deatheye/)
 * (@deatheye)
 * [12 years, 11 months ago](https://wordpress.org/support/topic/php_network_getaddresses-getaddrinfo-failed/#post-3788360)
 * I’ve made a few checks.
    $_Server[“SERVER_ADDR”] = Doesnt work on Windows / IIS
   $_Server[“LOCAL_ADDR”] = is the same as $_Server[“SERVER_ADDR”] on unix, does
   give the external IP $_SERVER[“REMOTE_ADDR”] = Returns external IP gethostbyname(
   $_SERVER[“SERVER_NAME”]) = Returns external IP
 * I geuss that’s the Problem. Trying to search the MySQL Server on the external
   Network doesn’t work. It is not accesssable from the outside.
 * So how do I Change this so that the internal IP get’s used?

Viewing 1 replies (of 1 total)

The topic ‘php_network_getaddresses: getaddrinfo failed’ is closed to new replies.

## Tags

 * [iis](https://wordpress.org/support/topic-tag/iis/)

 * In: [Hacks](https://wordpress.org/support/forum/plugins-and-hacks/hacks/)
 * 1 reply
 * 1 participant
 * Last reply from: [Deatheye](https://wordpress.org/support/users/deatheye/)
 * Last activity: [12 years, 11 months ago](https://wordpress.org/support/topic/php_network_getaddresses-getaddrinfo-failed/#post-3788360)
 * Status: not resolved

## Topics

### Topics with no replies

### Non-support topics

### Resolved topics

### Unresolved topics

### All topics
