Author Topic: PDO extension won't load for Zend Framework  (Read 5456 times)

0 Members and 1 Guest are viewing this topic.

Offline adefields64Topic starter

  • Irregular
  • Posts: 2
    • View Profile
PDO extension won't load for Zend Framework
« on: January 06, 2009, 10:05:13 PM »
I'm using the Zend Framework and specifically the PDO extension for MySQL.  I have the following lines uncommented in my php.ini file (using Windows):

extension=php_pdo.dll
extension=php_pdo_mysql.dll


I have the php_pdo.dll and php_pdo_mysql.dll files in the C:/<phpHome>/ext directory.  I've been using both PHP and MySQL for several years, so I don't think it is an installation problem with either of those, but instead specifically with this extension.  I ran a script to see what extensions are loaded and this one (PDO) does not show up.  I also get the error, "The PDO extension is required for this adapter but the extension is not loaded" everytime I try to run any code using PDO.  And yes, I have restarted the Apache server several times.  I can't for the life of me figure out why this extension won't load.  Any help would be greatly appreciated.

Offline corbin

  • Guru
  • Freak!
  • *
  • Posts: 7,951
  • Gender: Male
    • View Profile
Re: PDO extension won't load for Zend Framework
« Reply #1 on: January 06, 2009, 10:48:23 PM »
Does the Apache error log say anything?
Why doesn't anyone ever say hi, hey, or whad up world?

Offline adefields64Topic starter

  • Irregular
  • Posts: 2
    • View Profile
Re: PDO extension won't load for Zend Framework
« Reply #2 on: April 26, 2009, 03:48:58 PM »
RESOLVED:

Yes, the Apache error log says:

PHP Warning:  PHP Startup: Unable to load dynamic library './php_pdo.dll' - The specified module could not be found.\r\n in Unknown on line 0

It says this for all the PDO extensions, but they are all in the C:\<php home>\ext directory.  However, that led me to think they may need to be in a different directory as well.  Sure enough, I copied the PDO .dll files into the C:\WINDOWS\System directory (On XP), restarted the apache server.  The error went away and I can now access my database.  Thanks for the suggestion.  Sometimes it is as simple as something like that that points you in the right direction.   :)