Ticket #5951 (new defect)

Opened 5 months ago

Last modified 5 months ago

wp-db.php: The specified CGI application misbehaved by not returning a complete set of HTTP headers.

Reported by: brh Assigned to: anonymous
Priority: normal Milestone: 2.9
Component: General Version:
Severity: critical Keywords:
Cc:

Description

On IIS servers, trying to install Wordpress results in an error:

The specified CGI application misbehaved by not returning a complete set of HTTP headers.

The fix (for me) involved this forum thread: http://wordpress.org/support/topic/131976

I needed to use the patched copy of wp-db.php from http://wordpress.pastebin.ca/893007

Once Wordpress is installed, these changes are no longer needed. However, without them you can't install on IIS systems.

Attachments

5951_wp_db_php.txt (12.6 kB) - added by MichaelH on 04/02/08 13:21:13.
A suggested fixed wp_db.php that sometimes works and sometimes does not work.

Change History

02/22/08 03:28:40 changed by ryan

That adds a mysql_ping() loop that is run before every query. If there are problems connecting to the MySQL server, something else is wrong. If you restore the regular 2.3.3 wpdb, what errors do you see in your error log? Making each query retry connecting to MySQL for 10 seconds is not a good solution.

02/22/08 03:30:36 changed by ryan

Perhaps related to #5932.

02/22/08 14:30:44 changed by MichaelH

Regarding "The specified CGI application misbehaved by not returning a complete set of HTTP headers." The problem has been observed on a number of hosts, including aruba.it and ixwebhosting.com, since the release of 2.3.

The version of wp-db.php at http://wordpress.pastebin.ca/893007 DID NOT resolve the problem of installing WordPress on an IIS server running with Server API CGI/FastCGI. Using that version of wp-db.php does allow you to get to the install screen where it asks for the Blog Name and email address but clicking the Install WordPress button causes "Error 404 - File or directory not found. Internet Information Services (IIS)" message.

The only solution that seems to work is either upgrading to a Linux host or getting the host to run PHP as an ISAPI extension. Some hosts (e.g. using Plesk) allow the user to set PHP to run as ISAPI extension.

Below is the first part of phpinfo from a recent install attempt at aruba.it

PHP Version 4.4.1

System Windows NT WEBS1040 5.2 build 3790 Build Date Oct 30 2005 12:44:57 Server API CGI/FastCGI

02/22/08 14:41:20 changed by MichaelH

Another related forum thread: http://wordpress.org/support/topic/150484

04/02/08 13:21:13 changed by MichaelH

  • attachment 5951_wp_db_php.txt added.

A suggested fixed wp_db.php that sometimes works and sometimes does not work.