Posted by mpar612 on 05/01/07 13:05
I am stumped. Below is my code and it doesn't work (I removed the
$login info for posting).
PHP Code:
require 'PEAR/DB.php';
// Connect to the database
$db = DB::connect($login);
if (DB::isError($db)) { die ("Can't connect: " . $db->getMessage()); }
// Set up automatic error handling
$db->setErrorHandling(PEAR_ERROR_DIE);
// Set up fetch mode: rows as objects
$db->setFetchMode(DB_FETCHMODE_ASSOC);
if (class_exists('DB')) {
print "ok";
} else {
print "failed";
}
However, this code does:
PHP Code:
require 'PEAR/DB.php';
if (class_exists('DB')) {
print "ok";
} else {
print "failed";
}
I just switched ISP's and none of the stuff that utilizes PEAR works
on the new ISP. PEAR is installed. The DB module is installed, but I
can't connect to a database. I don't get any errors. I just get a
blank screen.
Any thoughts would be greatly appreciated. Thanks!
[Back to original message]
|