Whenever a mysql function is called, the script just dies. No output, and no "die" output either. No output about it on the php error logs either. I can't log into the db and access at all. Php just dies and I get a screen as if there was no page. How can I fix this? Or at the very least, get any output about the error to troubleshoot?
Same happens when using root. And, even when the info is wrong, there's no output. But, when going to the Drupal site, there's output at least when the log in info is wrong.
Here's the code of my main site's db class
class DB{
public $con = null;
public $user = 'viewer';
public $pass = 'viewer';
function __construct(){
ini_set('display_errors', 1);
error_reporting(E_ALL);
echo $this->user.' '.$this->pass.' wee';
$con = mysql_connect("localhost",$this->user,$this->pass);// or die(mysql_error());
//echo "connected";
//mysql_select_db("db_name", $con);*/
}
function query($query){
/*$query = mysql_real_escape_string($query);
$return = mysql_query($query) or die(mysql_error());
return $return;*/
}
function fetch_array($result){
//return mysql_fetch_array($result);
}
function __destruct() {
if (isset($con) ){
mysql_close($con);
}
}
}
?>
Thanks
die()
in there, does it generate an error?