No such host is known

Warning : mysqli::__construct(): php_network_getaddresses: getaddrinfo for failed: No such host is known. in C:\xampp\htdocs\base\includes\ on line 24

-There is more to the error, but I cant send it because it is apparently a link, and I cant send more than two…

Other Information

I’m trying to set up a database with Infinity Free, but it doesn’t work. It says that no such host is known.
This is the code for, where I put the global variables of the database credentials.

define(“servername”, “”);
define(“username”, “epiz_33959211”);
define(“password”, “**************”);
define(“dbname”, “epiz_33959211_bases”);

line:24: $mysqli = new mysqli(servername, username, password, dbname);

It works well when its localhosted, not sure what would be causing this.


Do to limitations on the free platform, you can’t connect to an InfinityFree database from an external website. To test your code, upload it to the server, then visit it over your domain name.


This is obviously wrong


This topic was automatically closed 7 days after the last reply. New replies are no longer allowed.