i am not able to connect to MySQL database after working approx 5 hours on MySQL database... is this any cache problem or some type of limit
i get blank page... with static html only
$hostname_localhost = "localhost";
$database_localhost = "akhai";
$username_localhost = "root";
$password_localhost = "";
$localhost = mysql_pconnect($hostname_localhost, $username_localhost, $password_localhost) or trigger_error(mysql_error(),E_USER_ERROR);
mysql_sel开发者_如何学Cect_db($database_localhost);
you can get all errors from your script by turning on error reporting (in case it isn't fatal error)
error_reporting(E_ALL);
ini_set("display_errors", 1);
It will give you your answer
you can also trigger error handler on mysql_connect();
mysql_connect("localhost", "name", "pass") or die(mysql_error());
are you sure your mysql database is up and running?
Mysql close the connection if there is no actions for a long time . login in mysql and run: show variables like "wait_timeout"; you will see the default time.
Setting a longger time of wait_timeout or reconnect in you php when connection lost.
精彩评论