Jump to content

Zend Frameworks & MySQL help


OAFC_Rob

Recommended Posts

I have decided to have a bash at teaching myself Zend frameworks, the inital setup etc... has gone smoothly but I want to use MySQL and not SQLite as shown in the quickstart tutorial. I have enabled PDO_mysql in my php.ini file which wasn't there to start with and I have add what I thought was correct lines of code into the confirgation file see below

 

[production]
phpSettings.display_startup_errors = 0
phpSettings.display_errors = 0
includePaths.library = APPLICATION_PATH "/../library"
bootstrap.path = APPLICATION_PATH "/Bootstrap.php"
bootstrap.class = "Bootstrap"
appnamespace = "Application"
resources.frontController.controllerDirectory = APPLICATION_PATH "/controllers"
resources.frontController.params.displayExceptions = 0
resources.view[] =
resources.layout.layoutPath = APPLICATION_PATH "/layouts/scripts/"
resources.db.adapter = "PDO_MYSQL"

[staging : production]


[testing : production]
phpSettings.display_startup_errors = 1
phpSettings.display_errors = 1

[development : production]
phpSettings.display_startup_errors = 1
phpSettings.display_errors = 1
resources.frontController.params.displayExceptions = 1
resources.db.adapter = "PDO_MYSQL"
resources.db.params.host = "localhost"
resources.db.params.username = "root"
resources.db.params.password = "password"
resources.db.params.dbname = "test"


 

However this doesn't seem to be working and throwing back the following error message

 

Fatal error: Uncaught exception 'Zend_Db_Adapter_Exception' with message 'The PDO extension is required for this adapter but the extension is not loaded' in /var/www/spider-content/library/Zend/Db/Adapter/Pdo/Abstract.php:342 Stack trace: #0 /var/www/spider-content/library/Zend/Db/Adapter/Abstract.php(247): Zend_Db_Adapter_Pdo_Abstract->setFetchMode(2) #1 /var/www/spider-content/library/Zend/Db.php(270): Zend_Db_Adapter_Abstract->__construct(Array) #2 /var/www/spider-content/library/Zend/Application/Resource/Db.php(142): Zend_Db::factory('PDO_MYSQL', Array) #3 /var/www/spider-content/library/Zend/Application/Resource/Db.php(154): Zend_Application_Resource_Db->getDbAdapter() #4 /var/www/spider-content/library/Zend/Application/Bootstrap/BootstrapAbstract.php(683): Zend_Application_Resource_Db->init() #5 /var/www/spider-content/library/Zend/Application/Bootstrap/BootstrapAbstract.php(626): Zend_Application_Bootstrap_BootstrapAbstract->_executeResource('db') #6 /var/www/spider-content/library/Zend/Application/Bootstrap/Bootst in /var/www/spider-content/library/Zend/Db/Adapter/Pdo/Abstract.php on line 342 


 

I have had a look around and can't seem to find a solution to this problem, has anyone got any ideas??? I'm pretty stuck at the moment  :'(

Link to comment
Share on other sites

This thread is more than a year old. Please don't revive it unless you have something important to add.

Join the conversation

You can post now and register later. If you have an account, sign in now to post with your account.

Guest
Reply to this topic...

×   Pasted as rich text.   Restore formatting

  Only 75 emoji are allowed.

×   Your link has been automatically embedded.   Display as a link instead

×   Your previous content has been restored.   Clear editor

×   You cannot paste images directly. Upload or insert images from URL.

×
×
  • Create New...

Important Information

We have placed cookies on your device to help make this website better. You can adjust your cookie settings, otherwise we'll assume you're okay to continue.