Welcome, Guest. Register Now!
   
Mark Forums Read Mark Forums Read Mark Forums Read


Reply
 
LinkBack Thread Tools Display Modes
  #1 (permalink)  
Old 07-22-2008, 03:24 AM
Matt1776's Avatar
Junior Member
 
Join Date: Jun 2008
Location: Orange County, California
Posts: 15
Send a message via Yahoo to Matt1776 Send a message via Skype™ to Matt1776
Default PDO MySQL Extension

Hello,

I'm giving Zend Framework a try, so far so good. The framework likes to use the PDO Database objects to connect to the Database. All well and fine. My Hosting plan indicates that I 'probably' have the PDO MySQL extension installed and to make sure I have the following lines in my php.ini:

Code:
You should add "extension=pdo.so" to php.ini
You should add "extension=pdo_mysql.so" to php.ini
Which I did add. I also confirmed that my version of PHP is new enough which it is at version 5.2.6.

However, I get an error when a connection to the database is attempted. Here is the error:

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 /home1/ioforgec/zendev/library/Zend/Db/Adapter/Pdo/Abstract.php:94 Stack trace: #0 ome1/ioforgec/zendev/library/Zend/Db/Adapter/Abstract.php(389): Zend_Db_Adapter_Pdo_Abstract->_connect() #1 /home1/ioforgec/zendev/library/Zend/Db/Adapter/Pdo/Abstract.php(205): Zend_Db_Adapter_Abstract->query('SELECT auth FRO...', 'admin') #2 /home1/ioforgec/zendev/library/Zend/Db/Adapter/Abstract.php(616): Zend_Db_Adapter_Pdo_Abstract->query('SELECT auth FRO...', 'admin') #3 /home1/ioforgec/zendev/application/controllers/MyAuthAdapter.php(43): Zend_Db_Adapter_Abstract->fetchAll('SELECT auth FRO...', 'admin', 'welcome') #4 /home1/ioforgec/zendev/library/Zend/Auth.php(117): MyAuthAdapter->authenticate() #5 /home1/ioforgec/zendev/application/controllers/LoginController.php(40): Zend_Auth->authenticate(Object(MyAuthAdapter)) #6 /home1/ioforgec/zendev/library/Zend/Controller/Action.php(5 in /home1/ioforgec/zendev/library/Zend/Db/Adapter/Pdo/Abstract.php on line 94



The PDO MySQL package is definitely installed on the server:

Code:
[ioforgec@box439 zend]$ ls /usr/lib/php/extensions/no-debug-non-zts-*
pdo.a  pdo.so  pdo_mysql.a  pdo_mysql.so  pdo_sqlite.a  pdo_sqlite.so
Has Anyone worked with PDO? Does it involve some gotcha that im not aware of? The php.ini file has the correct extension configurations and the extension_dir specified does have the appropriate shared object files in it.

Do I require a restart of some kind?
__________________
Bugs that go away by themselves come back by themselves
Never take life seriously, Nobody gets out alive anyway.
Digg this Post!Add Post to del.icio.usBookmark Post in TechnoratiFurl this Post!
Reply With Quote
  #2 (permalink)  
Old 07-22-2008, 10:56 PM
Matt1776's Avatar
Junior Member
 
Join Date: Jun 2008
Location: Orange County, California
Posts: 15
Send a message via Yahoo to Matt1776 Send a message via Skype™ to Matt1776
Default

Resolved:

My WebHost was doing some funky dance with the threaded/non-threaded versions of the PDO Shared Object files and neglected to update their help files to inform of the change.

Thought this might be relevant path to explore if anyone else ever had this issue. Cheers!
__________________
Bugs that go away by themselves come back by themselves
Never take life seriously, Nobody gets out alive anyway.
Digg this Post!Add Post to del.icio.usBookmark Post in TechnoratiFurl this Post!
Reply With Quote
Reply


Thread Tools
Display Modes

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

vB code is On
Smilies are On
[IMG] code is On
HTML code is Off
Trackbacks are On
Pingbacks are On
Refbacks are On



All times are GMT. The time now is 01:24 AM.