Hi, I am using Zend Framework and my application works on localhost but produces the can't connect to MySQL server error when I'm trying to connect to the database I've uploaded on a live server. I've tried handling exceptions and Zend_Exception catches it("perhaps factory() failed to load the specified Adapter class"). I've emailed the webmaster and he told me that Phpmyadmin is working fine so there should be no problem with connecting php to mysql. What else can I do? The lines that produce the error are the following:
$db = Zend_Registry::get('db');
$sql = 'SELECT * FROM department';
$result = $db->fetchAll($sql);
Is there something specific I can ask the webmaster to look at?
EDIT:
in my bootstrap:
public function _initDB()
{
$dbOptions = $this->getOption('db');
$db = Zend_Db::factory($dbOptions['adapter'], $dbOptions['params']);
Zend_Registry::set('db', $db);
Zend_Db_Table_Abstract::setDefaultAdapter($db);
}
in my application.ini:
db.adapter = PDO_MYSQL
db.params.host = agila.upm.edu.ph
db.params.username = FacultyDB
db.params.password = *********
db.params.dbname = FacultyDB