Jump to content

php and mysql newbie: php version problem


Recommended Posts

Dear all,

 

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, and I'm now getting a funny message when I start Apache (or when I boot if I run Apache as an auto service).

 

database connection prob: 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}

 

The thing is, and this might or might not lead to answers to both problems, I didn't notice the message on the php windows binaries download page which says "if you're using Apache, don't use the "VC9" build, use the "VC6" build".

 

So now I've got hold of the VC6 and all these VC6 files are now in the PHP directory.  I have configured the php.ini file as numerous installation guides tell you (sitewizard.com is what I've followed).

 

Whenever I start the Apache server I get this message on a little dialog:

 

PHP startup: mysql:

Unable to initialize module

Module compiled with build ID=API20090626, TS, VC6

PHP compiled with build ID=API20090626, TS, VC9

These options need to match

 

... what's funny to me about this is that it says "php compiled" ... and it also says that the PHP on my machine is the VC9 build, i.e. the build I installed first and shouldn't have, the bad build, the nasty build, the build I want out of my life for ever.

 

How can I get shot of my VC9 build and any smelly traces it may have left on my computer, which might induce the latter to think the PHP I'm using is anything but the good, clean, fine VC6 build?

 

Also, what does it mean "php compiled"?... surely this is strange if I've replaced all the VC9 files in the \PHP directory with the VC6 files (which I have)... aren't the windows binaires you extract from the .zip file you download compiled already?

 

Alternatively, can someone tell me how to flush PHP out of every corner of my machine, including any traces pertaining to MySQL which may be in MySQL directories... so I can start from scratch with the VC6 build?

 

Sorry about the length of this... Thanks for any help

 

 

 

 

 

 

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.