Question

I am working on a PHP/C# Soap Service project and I am having a problem running it in IIS although it was previously working a while ago.

When I try and go to the ASMX file or the WSDL file I get an IIS error:

HTTP Error 500.0 - Internal Server Error Calling LoadLibraryEx on ISAPI filter "C:\php\php5isapi.dll" failed

The php5isapi.dll is in the location specified in the error and it is added to the isapi filter within IIS. I know PHP is working fine as standard .php file works so, but I don't understand why ASMX/WSDL files would be accessing the php5isapi dll as it's not PHP. The soap service is in a C# ASMX Web service.

This only happens why I enable 32 bit applications in the application pool. This needs to be true as when its not it throws an ASP exception stating that a DLL is not in the correct format.

I know the actual service works fine as it runs OK on linux under Mono so there is just something wrong with IIS but I can't see what.

Thanks for any help you can provide.

Était-ce utile?

La solution

This looks to be the same issue no? https://bugs.php.net/bug.php?id=39163

There "FreakTrap at gmail dot com" suggests the following solution:

sneakers05's modification of the Application Pool's 32-bit setting also corrected the problem I was having with the php5isapi.dll.

For those of us getting the 'Calling LoadLibraryEx on ISAPI filter "C:\PHP\php5isapi.dll" failed' error after an attempted manual install:

1) Start with a fresh IIS installation with both ISAPI filters and extensions enabled.

2) Under the main settings [at the very top of your IIS Manager's hierarchy view, above Application Pools], add the following in this order:

  • an ISAPI Filter for php5isapi.dll
  • a ISAPI and CGI Restriction entry for php5isapi.dll
  • a Handler Mapping for php5isapi.dll

3) Go to the application Pools section.

4) Right-click on Default Application Pool and select Advanced Settings.

5) Set the second option [Enable 32-Bit...] to True.

Also, it is important that your 'Default Website' not have any unique settings from the top-level configurations. This was causing my ISS to exhibit some pretty strange behavior, which is why I recommend that you first delete your default website and create a new one.

I feel bad simply suggesting a link but see there is not much activity so thought it might help.

Autres conseils

The common causes of this error are:

  1. Missing DLL
  2. Mismatching bit versions

If the DLL is present in the correct location, it is highly likely that the bit version of the DLL does not match the bit version of application pool (e.g. you're trying to load 32-bit version of a filter in a 64-bit app pool).

The solution, should you choose to fight this behavior, is to use 32-bit apps and filters in 32-bit app pools; likewise for 64-bit. Configure your websites and move your ASPX and PHP code around as you see fit. Keep in mind that php5isapi.dll was retired few years ago.

The rerommended solution is to install the lastest, 32-bit, non-thread-safe PHP along with FastCGI module. Your PHP applications will work regardless of the "Enable 32-bit Applications" setting. You can use:

  1. PHP MSI installer to install PHP
  2. PHP Manager for IIS to manage the installation (it can also help you install PHP from ZIP archives)

I once had a problem similar to this where IIS couldn't find the php5isapi.dll.

It turns out that the problem was that I specified the path to the dll with the 'browse' button. This resulted in an abbreviated path (with a ~ in it).

I actually typed out the path by hand (instead of using the browse button) and suddenly IIS could find the dll. (and the path was not abbreviated).

Licencié sous: CC-BY-SA avec attribution
Non affilié à StackOverflow
scroll top