Archive for the ‘IIS’ Category

PHP and IIS7 using FastCGI – HTTP 500 error

IIS | Posted by p_lider December 18th, 2012

When you install a php into IIS7 and try to execute phpinfo() script you can get an HTTP 500 Internal Server Error message. The most probably cause of this is that php-cgi.exe program is writing some text to stderr. By default IIS7 displays an HTTP 500 error message when it detects such behavior even, when the CGI displayed only a warning message on stderr. To avoid this problem you have to change default error handling for FastCGI in IIS7.

To do this follow the following steps:

  1. Start IIS Manager
  2. Click on <server name> and then in the right pane go to “FastCGI Settings”.
  3. Right click on php-cgi.exe file and choose “Edit…”.
  4. Set the “Standard error mode” option to “IgnoreAndReturn200” value.
  5. Click OK and close IIS Manager.

After performing mentioned steps you shall no longer see HTTP 500 error messages in the browser.

“Object Required” error while changing passwords using OWA

IIS, MS Exchange, Windows Server 2003 | Posted by p_lider September 6th, 2010

After deploying MS Exchange 2003 server in your organization and configuring OWA to let users change their domain passwords you can face a strange issue. When users try to change their passwords, after clicking “OK” button they see an error message saying “Object Required” and their password are not being changed. This enigmatic error message means, that the MS Exchange cannot find a properly registered COM object in the registry. To solve the problem you must manually register the “iispwchg.dll” library on the MS Exchange server. The full command to do this is:

regsvr32 %windir%\system32\inetsrv\iisadmpwd\iispwchg.dll

The reason why MS Exchange does not register mentioned library by itself during the installation is unknown for me. However I noticed, that MS Exchange installers are written is such a way, so the administrators can demonstrate their knowledge and skills <ironic> before the MS Exchange product can start fully working.

Changing IIS web server certificates without any downtime

IIS | Posted by p_lider August 23rd, 2010

Once, during my work, I have been asked to replace unsigned certificates with the signed ones for our Exchange email servers, so people using OWA will no longer see a “Certificate error” message. I made a little search and found cheap certificates on the web. So I started to look for a way to do a certificate request and replace current certificates with the new, signed ones. Unfortunately, I did not find any official way from Microsoft to do this in IIS 6.0 server causing no downtime to the web servers. The problem was as follows:

If I choose (in IIS Manager) to create a new Certificate request for the web site hosting MS Exchange OWA application then the website will be inaccessible (because the IIS in its glory will discard the previously used certificate and wait until the current request will be properly completed with the response from CA) till the day I will obtain the response from the CA. Such long downtime was of course not acceptable. Fortunately, I found a way to work around this limitation:

  1. I created a new, blank web site using IIS manager.
  2. Then I created the new certificate request for this blank website (however, which was VERY IMPORTANT, while creating this request I filled the CN attribute with the address of the web site hosting OWA application, NOT the address of the blank web site).
  3. I sent the request to CA and wait for their response.
  4. Once I got the response I completed the certificate request on the blank page which made the certificate to be fully installed in the certificate store for the IIS.
  5. At the end I just went back to the right web site (the one which was hosting OWA) and replaced the current certificate with the one, which was installed for the blank web site.

 That did the trick and the web site did not suffer any downtime. Of course, this trick will work for any web site in IIS, not only the ones hosting OWA application.