nyoman
June 22, 2020, 1:22am
1
Username (e.g. epiz_XXX) or Website URL
website : http://cobaaa.epizy.com/
hello admin i need your help,
I have a problem in making a connection to the database, the result is always “Connection timed out”. this my php code :
<?php
//Mendefinisikan Konstanta
define('HOST','http://sql312.epizy.com');
define('USER','epiz_26072317');
define('PASS','HIDDEN BY MOD');
define('DB','epiz_26072317_app');
//membuat koneksi dengan database
$con = mysqli_connect(HOST,USER,PASS,DB);
if (!$con) {
die("connection: " . mysqli_connect_error());
}else{
echo " done ";
}
?>
thanks in advance
I can’t see any errors in your PHP syntax.
This is maybe only a temporary issue due to maintenance of InfinityFree servers. The error “Connection timed out” is also because of maintenance.
Kindly read this official announcement:
As many of you know, in the last few weeks iFastNet has been moving all websites to new and faster storage for all websites. For most websites, this could be done with minimal impact to websites which were already working.
However, this was not possible with the websites hosted on the IPs 185.27.134.137 and 185.27.134.138. If your website is one one of these IPs, you will see issues like:
The connection has timed out
Error 522 - Connection Timed Out
ERR_CONNECTION_TIMED_OUT
Additionally, you…
EDIT: Im not an Admin but Im trying to help you!
Also, if you are sure that your main IP address is not affected, consider reading and applying this:
Many websites use MySQL databases to store information and settings. However, there are some reasons why the connection to the database may fail. This article describes some commonly seen error messages when connecting to a database, as well as some...
By the way, please dont expose sensitive data on the forum.
Host is not a WEBSITE url, please remove its http
define('HOST','sql312.epizy.com');
5 Likes
nyoman
June 22, 2020, 10:30pm
5
i’m sorry sir
i forgot to hide my sensitive data. coz i’m so confiuse and just click post, and i don’t know to how to edit my post, next time i’ll never do this again
1 Like
system
Closed
July 7, 2020, 10:30pm
6
This topic was automatically closed 15 days after the last reply. New replies are no longer allowed.