I am getting following error while connecting to my database:
Internal Server Error The server encountered an internal error or misconfiguration and was unable to complete your request. Please contact the server administrator at admin@main-hosting.eu to inform them of the time this error occurred, and the actions you performed just before this error. More information about this error may be available in the server error log.
php_error.log file:
[25-Feb-2017 09:45:09 UTC] PHP Warning: mysqli_connect(): (HY000/2003): Can't connect to MySQL server on 'mysql.hostinger.in' (4 "Interrupted system call") in /home/u191892126/public_html/API/connect.php on line 8
My php file:
<?php $servername = "mysql.hostinger.in";//var deceleration I tried "localhost" too $username = "u1918921**_root"; $password = "*********"; $dbname = "u191892126_acare"; // Create connection $conn = mysqli_connect($servername, $username, $password, $dbname); // Check connection if (!$conn) { die("Connection failed: " . mysqli_connect_error()); } ?>
Advertisement
Answer
It was a server’s error tried it again(it took 4 hours) and everything was working fine.