views:

1139

answers:

7

I am trying to install Php on Vista (IIS 7). The installation and configuration seems to be fine. Pretty much followed everything mentioned in http://blogs.iis.net/bills/archive/2006/09/19/How-to-install-PHP-on-IIS7-_2800_RC1_2900_.aspx

I can even bring up a test.php which is basically and can also connect to mysql db through code. But when I try to bring up some other php page like drupal's index page or phpmyadmin index page, it brings up a Php access violation message.

Any clue whats happening? Also is there some tracing/diagnositic tool for php to trace whats happenign on the webserver.

+3  A: 

Hi!

In your PHP.INI file, try to comment all the extensions lines and restart IIS. Take note that MySql will no longer work. Do some tests.

If it's successfull, uncomment back the mySql line. Do some tests.

If it's unsucessfull, them I can't help you more. I suspect that's a loaded extension causing the error. You have to find which one...

Hope this helps.

vIceBerg

vIceBerg
A: 

I'm assuming you're using PHP 5.2.6 (latest version). I'm also assuming your using ISAPI from the directions in your link.

There seem to be a lot of bug reports for PHP on IIS with access violations.

Here and here or a list

So far the only suggestion I've found is to try FastCGI instead of ISAPI.

I've never had to mess with debugging PHP itself, my own scripts of cource, but not PHP. There are instructions for generating a backtrace and some general debugging info.

Edit -- After reading viceBerg's answer I remembered another possible cause was non-thread safe PHP extensions and IIS not liking each other. It might be worth it to disable them all and enable them one at a time but it's only really useful if you can get a script to cause that error consistently.

Without a consistent, reproducible error this will be very hard to debug.

Simurr
+1  A: 

Thanks guys. I disabled all the extensions and started added one at a time and only the ones I needed to use (mysql,mbstring etc). I also had to copy php.ini into System32 folder (even though I had it in the system Path). Voila, it worked.

I think you should accept an answer when somebody tell you what to do and he's solution works. I think you should also vote for the answer...
vIceBerg
A: 

Try moving the libmysql.dll that came with php to windows\system32

A: 

moving libmysql.dll to windows\system32 worked! thanks!!!

ernest
A: 

moving the libmysql.dll that came with php to windows\system32 worked for me too! Thanks!

Dan
A: 

I'm seeing this bug, too. We're getting the infamous "PHP has encountered an Access Violation at 01E02B1B" periodically, and cycling IIS seems to resolve it. We're running PHP Version 5.2.6 as an ISAPI, on Windows Server 2003 SP2 with IIS 6.

I read that moving the libmysql.dll that came with php to windows\system32, and that it seems to help in some cases. Can anyone explain what this move does, exactly? And is it really as easy as physically moving the file? Or are there other steps (registry changes, etc) that will also need to be made?

Tim