I'm trying to get php_mysql to work. I'm on a windows 7 box, with php

When I have ;extension=php_mysql.dll commented out like that, apache works, php works, and of course mysql in the background is working, but I cannot use mysql with php. (My objective is to install a phpBB3 forum, and it doesn't list mysql as available.)

Now something I notice is that while php works in apache (that is, it serves up php pages appropriately), it fails on the command line. I don't know if this is related or if I'm just doing it wrong from the command line. Moving on...

When I uncomment out the extension line, I get the following error:

Faulting application name: httpd.exe, version:, time stamp: 0x4f242d7a
Faulting module name: php5ts.dll, version:, time stamp: 0x4d25fb49
Exception code: 0xc0000005
Fault offset: 0x000f424c
Faulting process id: 0x1ba8
Faulting application start time: 0x01cd24b82c102b69
Faulting application path: C:\Program Files\Apache Software Foundation\Apache2.2\bin\httpd.exe
Faulting module path: C:\php\php5ts.dll
Report Id: 6b3b2e2c-90ab-11e1-a61b-005056c00008

I'll try to provide whatever logging, versioning, or configuration data you might need to diagnose this issue.


The exception code is an access violation, which is a generic memory bug indicating the code in the DLL attempted to use an address not allocated to it (generally). This means either your machine has a hardware fault such as bad RAM (causing the pointer to be corrupt) or the DLL is corrupt. The DLL may also be linked against some version of mysql or apache which is not binary-compatible with the one you are using.

  • The dll is the one that came with the most recent version of mysql. Would upgrading to the latest version of php solve this problem? Or more accurately, is it likely enough to solve the problem that it would be worth doing?
    – corsiKa
    Apr 27 '12 at 21:30
  • You should always upgrade to the latest version of PHP as soon as it is released anyway, for security reasons. Therefore, it is certainly worth a try. You may also want to do a memtest86 on your unit. Apr 27 '12 at 21:32
  • On the php website, it says "If you are using PHP with Apache 1 or Apache2 from apache.org you need to use the VC6 versions of PHP" This must be why I'm using the 5.2 instead of 5.3.
    – corsiKa
    Apr 27 '12 at 21:38
  • 1
    Well, I decided to be a rebel and use 5.4 with VC9 binaries, even though it said not to. And it worked. And you're even in Calgary - I may need to buy you a beer! Thanks again!
    – corsiKa
    Apr 27 '12 at 23:05

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.