Archived

This forum has been archived. Please start a new discussion on GitHub.

PHP ICE Handler Mappings for IIS

My Setup:
  • Windows Server 2012 with IIS 8
  • PHP 5.4.14
  • ICE 3.5.1
I compiled php_ice.dll for my setup and verified that it is working via phpinfo(). However, when I try to load a php page that uses ICE in my browser, I get a 500 error:
500 - Internal server error.
There is a problem with the resource you are looking for, and it cannot be displayed.

According to Microsoft support, this is the cause:
This problem occurs because the handler mapping for the requested resource points to a .dll file that cannot process the request.

I tried to find the info I need to set up the Handler Mapping in the ICE documentation, but I was unsuccessful. I tried adding a handler for *.ice files to use FastCGI (basically a copy of my *.php handler) and it didn't work.

Could somebody help me get a handler mapping created (assuming that I correctly diagnosed that as the problem)?

Comments

  • xdm
    xdm La Coruña, Spain
    I don't see why you need to create a handler, if you have setup PHP, and added ice_php as an extension to your PHP setup that is all.

    We don't have setup instructions for IIS and PHP, the setup instructions we have are for Apache see here.

    You must check windows event viewer for any errors. And you need to make sure that ice_php extension can load the dependent libraries those are listed in the setup instructions for Apache.
  • Here's what I'm seeing in the event viewer:
    Faulting application name: php-cgi.exe, version: 5.4.14.0, time stamp: 0x5165bd29
    Faulting module name: MSVCR100.dll, version: 10.0.40219.325, time stamp: 0x4df2be1e
    Exception code: 0xc0000005
    Fault offset: 0x00001ed7
    Faulting process id: 0xab0
    Faulting application start time: 0x01cf1fa8fe12b418
    Faulting application path: C:\Program Files (x86)\PHP\v5.4\php-cgi.exe
    Faulting module path: C:\Windows\SYSTEM32\MSVCR100.dll
    Report Id: 3bca99a0-8b9c-11e3-9429-00044b02a37a
    Faulting package full name:
    Faulting package-relative application ID:
  • xdm
    xdm La Coruña, Spain
    The PHP version you are using has been build with VC100, but Ice for PHP only supports VC90. You will need a PHP binary build with the same compiler version (VC90).

    Building Ice for PHP with VC100 will require some fixes for the build system, that is out of the scope of the free support we can provide on the forums.

    The easier is to use Apache with our binary distribution, as explained in Using the Windows Binary Distribution - Ice 3.5 - ZeroC.
  • From phpinfo():
    Build Date Sep 18 2013 21:39:18
    Compiler MSVC9 (Visual C++ 2008)
    Architecture x86

    It says that my version of php is built using Visual C++ 2008 (VC90). I used VC90 to create php headers and build ICE from source, as well. Any ideas why php-cgi.exe would be using msvcr100.dll instead of msvcr90.dll? I checked my system32 folder, and msvcr90.dll is not in there. I have VC90 installed as well as the VC redistributable for 2008 (x86 and x64). However, the VC90 dll files are only contained in the WinSxS folder. Could that be the problem? Maybe it is trying to use VC100 because it can't find VC90 in system32.