Problem With PEAR DB connection

From: Date: Thu, 21 Nov 2002 08:38:31 +0000
Subject: Problem With PEAR DB connection
Groups: php.pear.general 
Request: Send a blank email to pear-general+get-2783@lists.php.net to get a copy of this message
I have madein this way with my Path Server ini_set('include_path','.:/home/html/PEAR'); require_once 'DB.php'; and i have made also in this way: ini_set("include_path", ini_get("include_path") . ":/home/username/pathto/PEAR/"); but change that i get a white page, total white, also the first echo print nothing now. Some other ideas? My problem is also that in my sever they haven't the debug on, so i can't understand why don't goes. What other can be somebody have ideas? Thanks Milo Mercoledì, novembre 20, 2002, alle 04:31 PM, LIMBOURG Arnaud ha scritto: The righ script is <?php    ini_set('include_path','.:/home/html/PEAR');  require_once 'DB.php';  $user = 'nome_user';  $pass = 'password';  $host = 'localhost';  $db_name = 'nome_db';  echo "prima della connesione<br>";  $dsn = "mysql://$user:$pass@$host/$db_name";  echo $dsn;    $db = DB::connect($dsn, true);  echo $db,"connesione effetuata";    if (DB::isError($db)) {
     die ($db->getMessage());
 }  $db->disconnect();  echo "disconnesione effetuata";    ?>
Ok i have put DB inside PEAR like your example, but with this simple script don't goes again: <?php ini_set('include_path',':./PEAR:./PEAR/DB'); // and this ini_set('include_path','./PEAR'); $user = 'nome_user'; $pass = 'password'; $host = 'localhost'; $db_name = 'nome_db'; echo "prima della connesione<br>"; $dsn = "mysql://$user:$pass@$host/$db_name"; echo $dsn; $db = DB::connect($dsn, true); echo $db,"connesione effetuata"; if (DB::isError($db)) {
    die ($db->getMessage());
} $db->disconnect(); echo "disconnesione effetuata"; ?> This is my resul page: prima della connesione mysql://nome_user:password@localhost/nome_db and nothing more. WHY? Mercoledì, novembre 20, 2002, alle 02:33 PM, LIMBOURG Arnaud ha scritto:
Create a directory called pear on the server. In it put PEAR.php DB.php DB/common.php DB/mysql.php (note that there is a DB directory) the include path just needs ini_set('include_path', ':/path/to/pear'); the way you define ./PEAR isn't good, it says, in the
current directory
take PEAR which defeats the purpose of include path. Arnaud.
Wait i haven't understand i have my site, and inside my site i hace copy this folder DB and PEAR, now i have put ini_set('include_path',':./DB:./PEAR'); but don't goes. But the folder DB must be inside the folder PEAR? In my MAC in localhost, isnt so.


« previous php.pear.general (#2783) next »