Legir Posted April 29, 2008 Share Posted April 29, 2008 Windows XP PHP Version 5.2.5 I've installed PDO using the windows installer on their site and have added these two lines to php.ini: extension=php_pdo.dll extension=php_pdo_mysql.dll My extension_dir is correct and I get the exception: could not find driver My code is: $dbc = new PDO('mysql:host=localhost;dbname=name', 'user', 'pass'); I do phpinfo() and it shows PDO, but nothing is enabled. I have both .dll files in my extension path. What is the deal? Quote Link to comment https://forums.phpfreaks.com/topic/103428-could-not-find-driver/ Share on other sites More sharing options...
Legir Posted April 29, 2008 Author Share Posted April 29, 2008 I just installed the SQLite pdo.dll and phpinfo() now show it as enabled but not the mysql dll file! Quote Link to comment https://forums.phpfreaks.com/topic/103428-could-not-find-driver/#findComment-529659 Share on other sites More sharing options...
wildteen88 Posted April 29, 2008 Share Posted April 29, 2008 Have you restarted your server (eg Apache or IIS). I always suggest adding PHP to the PATH Environment Variable. Quote Link to comment https://forums.phpfreaks.com/topic/103428-could-not-find-driver/#findComment-529695 Share on other sites More sharing options...
Legir Posted April 29, 2008 Author Share Posted April 29, 2008 Yeah, i've restarted several times. I also have my C:\PHP as an environment variable. The weird thing is, using the installer, I installed PDO sqlite and php does recognize it so I've switched over to that for now. Quote Link to comment https://forums.phpfreaks.com/topic/103428-could-not-find-driver/#findComment-529727 Share on other sites More sharing options...
Recommended Posts
Join the conversation
You can post now and register later. If you have an account, sign in now to post with your account.