2011-05-16 2 views
0

PEAR DB를 사용하여 mysql 데이터베이스에 연결하려고합니다. 그것은 나에게 다음과 같은 오류를 던지고 :어디에서 PEAR DB 오류 코드 목록을 찾을 수 있습니까?

<?php 
    require_once('DB.php'); 
    $db = new DB; 
    $db_host = 'internal-db.sxxxxx.gridserver.com'; 
    $db_user = 'xxxxx'; 
    $db_pass = 'xxxxx'; 
    $db_name = 'xxxxx'; 
    $dsn = "$db_user:[email protected]$db_host/$db_name"; 
    $resource = $db->connect($dsn); 
} 

사람이 내 오류가 여기에 볼 수 다음과 같이

DB_Error Object ( [error_message_prefix] => [mode] => 1 [level] => 1024 [code] => -4 [message] => DB Error: not found [userinfo] => Unable to include the DB/dbxxxxx:[email protected]/dbxxxxx_toomodern.php file for 'dbxxxxx:[email protected]/dbxxxxx_toomodern' [backtrace] => Array ([0] => Array ( [file] => /usr/local/php-5.2.14-2/share/pear/DB.php [line] => 966 [function] => PEAR_Error [class] => PEAR_Error [type] => -> [args] => Array ([0] => DB Error: not found [1] => -4 [2] => 1 [3] => 1024 [4] => Unable to include the DB/dbxxxxx:[email protected]/dbxxxxx_toomodern.php file for 'dbxxxxx:[email protected]/dbxxxxx_toomodern' )) [1] => Array ([file] => /usr/local/php-5.2.14-2/share/pear/PEAR.php [line] => 531 [function] => DB_Error [class] => DB_Error [object] => DB_Error Object RECURSION [type] => -> [args] => Array ([0] => -4 [1] => 1 [2] => 1024 [3] => Unable to include the DB/dbxxxxx:[email protected]/dbxxxxx_toomodern.php file for 'dbxxxxx:[email protected]/dbxxxxx_toomodern' )) [2] => Array ([file] => /usr/local/php-5.2.14-2/share/pear/DB.php [line] => 543 [function] => raiseError [class] => PEAR [object] => DB Object () [type] => -> [args] => Array ([0] => [1] => -4 [2] => [3] => [4] => Unable to include the DB/dbxxxxx:[email protected]/dbxxxxx_toomodern.php file for 'dbxxxxx:[email protected]/dbxxxxx_toomodern' [5] => DB_Error [6] => 1)) [3] => Array ([file] => /nfs/c07/h04/mnt/xxxxx/domains/wedding.juicywatermelon.com/html/validate.php [line] => 9 [function] => connect [class] => DB [object] => DB Object ( ) [type] => -> [args] => Array ([0] => dbxxxxx:[email protected]/dbxxxxx_toomodern ))) [callback] =>) 1

내 코드는? PEAR 오류의 온라인 색인이 있습니까? 내 인생에서 그들을 찾을 수 없습니다!

+0

에 코드의 주요 db.php를에서 설명하는 오류를 변경해야합니다 : // 배 .php.net/manual/ko/package.database.db.db-error.php –

답변

1

은 또한 DB 유형을 inlcude해야한다, 그래서 MySQL이 있다면, 당신은 HTTP에 따라,

$dsn = "mysql://$db_user:[email protected]$db_host/$db_name"; 
+0

예, 이것은 내 문제가 된 것입니다 .. – starsinmypockets

관련 문제