Take the 2-minute tour ×
Server Fault is a question and answer site for professional system and network administrators. It's 100% free, no registration required.

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: 2.2.22.0, time stamp: 0x4f242d7a
Faulting module name: php5ts.dll, version: 5.2.17.17, 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.

share|improve this question

1 Answer 1

up vote 2 down vote accepted

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.

share|improve this answer
    
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. –  Falcon Momot 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

 
discard

By posting your answer, you agree to the privacy policy and terms of service.

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