ekorenz Posted February 10, 2015 Posted February 10, 2015 User cpanel : ekoxt Server : stevie Domain : ekorenz.us In the past few days my blog there is a problem with the database can not be connected to the server. Please be fixed soon. Thanks Quote
sagnik Posted March 28, 2015 Posted March 28, 2015 You can set "display_errors" and "error_reporting" to "on" to analyse the problem.Like these: <?php ini_set('display_errors', 1); // Displays the errors error_reporting(E_ALL); // Turns on all errors (E_NOTICE, E_WARNING, E_STRICT, ETC) happening on your script $con = mysql_connect("username","password","localhost","user_database") or die(mysql_error($con)); // These will try to connect to database using details. If it couldn't connect then prints the error /*** OTHER THINGS YOU WANT TO DO ->> ***/ ?> After your problem was solved you can turn off Like these: <?php ini_set('display_errors', 0); // Displays the errors error_reporting(E_NONE); // Turns off all errors (E_NOTICE, E_WARNING, E_STRICT, ETC) happening on your script $con = mysql_connect("username","password","localhost","user_database"); // These will try to connect to mysql, if it fails then nothing happens /*** OTHER THINGS YOU WANT TO DO ->> ***/ ?> Quote
Recommended Posts
Join the conversation
You can post now and register later. If you have an account, sign in now to post with your account.