No such host is known

Warning : mysqli::__construct(): php_network_getaddresses: getaddrinfo for sql312.epizy.com failed: No such host is known. in C:\xampp\htdocs\base\includes\db.inc.php 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 db.inc.php, where I put the global variables of the database credentials.

define(“servername”, “sql312.epizy.com”);
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.

Welcome!

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.

3 Likes

This is obviously wrong

2 Likes

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