Reply to PHP PEAR DB module not working?

Your name:

Reply:


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]


Удаленная работа для программистов  •  Как заработать на Google AdSense  •  England, UK  •  статьи на английском  •  PHP MySQL CMS Apache Oscommerce  •  Online Business Knowledge Base  •  DVD MP3 AVI MP4 players codecs conversion help
Home  •  Search  •  Site Map  •  Set as Homepage  •  Add to Favourites

Copyright © 2005-2006 Powered by Custom PHP Programming

Сайт изготовлен в Студии Валентина Петручека
изготовление и поддержка веб-сайтов, разработка программного обеспечения, поисковая оптимизация