Jump to content

PDO extension won't load for Zend Framework


adefields64

Recommended Posts

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.

  • 3 months later...

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.  :)

Archived

This topic is now archived and is closed to further replies.

×
×
  • 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.