Jump to content

"could not find driver" error


mikerodent

Recommended Posts

Hi all,

 

(tried a forum search with the title of this posting ... came up with nothing)

 

I am getting a web server and stuff together on my machine.  Details:

 

OS: WXP, apache: 2.2.14, php: 5.3.1, mysql: 5.1.41, browser: Firefox 3.5.6.

 

my php/Apache is working fine... I encounter a problem when I try to get my php to connect to a database - on running a php file with the following line:

 

$dbh = new PDO("mysql:host=localhost; dbname=noggindb", "root", "twiddle" );

 

... I get the following response

 

exception 'PDOException' with message 'could not find driver' in C:\Program Files\Apache Software Foundation\Apache2.2\htdocs\noggindb\index.php:10 Stack trace: #0 C:\Program Files\Apache Software Foundation\Apache2.2\htdocs\noggindb\index.php(10): PDO->__construct('mysql:host=loca...', 'root', 'twiddle') #1 {main}

 

... anyone know what this is about?  Do you have to explicitly set up a MySQL driver?  I haven't seen this in my installation instructions (sitewizard.com)...  I assumed one of the .dll files was a driver... php_mysql.dll, or php_mysqli.dll or libmySQL.dll... the latter file is in my MySQL\bin directory... I can't remember whether I copied it there or what...

 

Any advice? Thanks

Link to comment
Share on other sites

  • 4 weeks later...
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.