mikerodent Posted December 20, 2009 Share Posted December 20, 2009 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 Quote Link to comment 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.