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.

Link to comment
Share on other sites

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

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.