problem using Pear's DB layer

From: Date: Wed, 02 Apr 2003 15:46:00 +0000
Subject: problem using Pear's DB layer
Groups: php.pear.general 
Request: Send a blank email to pear-general+get-4594@lists.php.net to get a copy of this message
hi all, this is my first post to the list so please excuse me if this is real basics! i'm working on a Windows 2K box, with Apache 2 and PHP 4.3.1. mySQL i've tryed to execute this script but i just get a blank page. <?php require_once 'DB.php'; $user = '***'; $pass = '***'; $host = 'kashia'; $db_name = 'spip_marcou'; // Data Source Name: This is the universal connection string $dsn = "mysql://$user:$pass@$host"; print($dsn); // DB::connect will return a PEAR DB object on success // or an PEAR DB Error object on error $db = DB::connect($dsn); print("database conection succesful"); // Alternatively: $db = DB::connect($dsn); // With DB::isError you can differentiate between an error or // a valid connection. if (DB::isError($db)) { die ($db->getMessage()); } // You can disconnect from the database with: $db->disconnect(); ?> if i put some print statments in, the script stops when it gets to DB::connect i _have_ defined the include_path to be a c:\php\pear but this isn't the problem because it is including the PEAR files. any help or advice would be greatly appreciated t.

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