CGI Error on IIS
Question
When running the script, I get an error message that says CGI Error The specified CGI application misbehaved by not returning a complete set of HTTP headers..
Answer
IIS 6.0 (Windows 2003)
Windows 2003 Server doesn't set the current working directory to the same path as the CGI script. You can confirm this discrepancy by looking at the top of your mt-check.cgi results:
# Current working directory: (path)
# MT home directory: (different path)
To correct this behavior, you (or your host) should do the following:
- Create a new "virtual directory" under IIS which points to the physical directory where the Movable Type CGI files are located (i.e., the "MT home directory"
mt-check.cgireports). - Download this new Bootstrap.pm file, and install it at
lib/MT/Bootstrap.pm(overwriting the original file). - Update CGIPath in
mt-config.cgito use the URL for the new virtual directory. - The Current working directory and MT home directory reported by
mt-check.cgishould now match, pointing to the actual physical location of the files.
At this point, Movable Type should run properly.
IIS 5.0
Edit each of the mt*.cgi files adding this to the top of each (below the first "#!..." line):
use File::Basename;
use File::Spec;
use lib File::Spec->catdir(dirname($0), "lib");
After you add those lines, Movable Type should work properly.



Comments
I received this same error on a server running IIS 5.0/Windows 2000 (w/ SP4 and latest MS patches as of 10/14/2005). Following these steps also allowed me to fix the problem. I created a virtual directory/application "MT", which pointed to the real directory "mt", installed the new Bootstrap module, updated the path in mt-config.cgi, and now when I access MT via either "mt/mt.cgi" or "MT/mt.cgi", the include path gets set properly and I can run MT.
Posted by: Sarah Chauncey
|
October 14, 2005 11:58 AM