I've finally managed to update my tutorial for version 0.9 of the Zend Framework. Sorry for the delay.
This is a significant reworking of the code to take into account the changes in the framework, so there are bound to be a few typos. If you find any, I'd appreciate it if you could let me know!



May 1st, 2007 at 14:25 #
Hi,
Your tutorial is great. However there is something I can't get working and I am posting it in the case other people using your material would face the same problem.
It deals with the config file.
I am using MySql and here is my info:
[general]
db.adapter = PDO_MYSQL
db.config.host = localhost
db.config.username = root
db.config.password =
db.config.dbname = test
Nothing crazy going on here... Here is the related bootstrap part:
// load configuration
$config = new Zend_Config_Ini('./application/config.ini', 'general');
$registry = Zend_Registry::getInstance();
$registry->set('config', $config);
// setup database
$db = Zend_Db::factory($config->db->adapter,$config->db->config->asArray());
Zend_Db_Table::setDefaultAdapter($db);
Just like in the tutorial.
However, here is the error message I get:
Fatal error: Uncaught exception 'Zend_Db_Adapter_Exception' with message 'The mysql driver is not currently installed' in C:\wamp\www\test\library\Zend\Db\Adapter\Pdo\Abstract.php:79 ...
Is there something I should install, if yes, how?
Thanks in advance and congratz on your great job!
Alex
May 18th, 2007 at 15:20 #
Alex Hi,
You may try to enable the mysql PDO extension for your web server.
Enabling just mysql extension without PDO version is not enough.
December 2nd, 2007 at 19:24 #
Hi, I have following setting in config.ini
db.adapter = PDO_MYSQL
db.config.host = localhost
db.config.username = root
db.config.password =
db.config.dbname = test
I am connecting using the code below:
$config = new Zend_Config_Ini('./application/config.ini', 'general');
$registry = Zend_Registry::getInstance();
$registry->set('config', $config);
// setup database
$db = Zend_Db::factory($config->db->adapter,$config->db->config->asArray());
Zend_Db_Table::setDefaultAdapter($db);
The strange thing is that, I can connect and query using the php cli, but when I accessing my website, I get this error "The mysql driver is not currently installed"
Please help.
December 2nd, 2007 at 20:02 #
Lalit,
I'd guess that you have a different php.ini file used when using apache.
Regards,
Rob...