Hi , I Connent and Query My Db Using PEAR DB Like This :
if(stristr($_SERVER['HTTP_HOST'] , 'localhost')){
$dsn = 'mysql://root:@localhost/xxx' ;
}else{
$dsn = 'mysql://xxx:xxx@localhost/xxx' ;
}
$dbc =& DB::connect($dsn);
$dbc->query("set names utf8" );
if (PEAR::isError($dbc , array('debug'=>3))) {
die($dbc->getMessage());
}
in Some Hosting It's Working Perfectly And for example if DB user doesn't have sufficient permissions it's sayes : Insufficient Permission , and other errors So Forth . and when i fix the problem the site will comes up and running well .
but in many hosting it's dosen't show many error !! and nothing on the page also ! the page is completly blank , no errors , no notice nothing ! i'm also set error_reporting(E_ALL) in top of my script . so i can't find the bug anyway is there any solution for such problem .