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

Source: Internet
Author: User
Tags command line ini php error perl script
is Error Reporting:
The specified CGI application misbehaved by not returning a complete set of HTTP headers
This means: (The HTTP protocol's CGI mode is not running correctly)

Because the-WT parameter is not supported in the first sentence of the Perl script, replace all-WT with-W
That is: Replace the #!/usr/bin/perl–wt with the following: #!/usr/bin/perl–w
This is on behalf of PHP is a CGI test run in php.ini find Gi.force_redirect the front of the semicolon removed the value of the change to 0 on the line.

Run it again, this is PHP another way to configure the mode of operation

PHP Error encountered today

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

The final solution is to change the PHP CGI mode to ISAPI.

environment: Windows XP Sp3+iis5.1+activeperl 5.10.0
After installing Bugzilla, configure CGI and run the following error:

CGI Error
The specified CGI application misbehaved by not returning a complete set of HTTP headers. The headers it did return are:

'-t ' on the #! Line, it must also is used on the command line at E:\BUGZILLA-3.4.2\BUGZILLA-3.4.2\INDEX.CGI Line 1.

Error Reporting:
The specified CGI application misbehaved by not returning a complete set of HTTP headers
This means: (The HTTP protocol's CGI mode is not running correctly)

Because the-WT parameter is not supported in the first sentence of the Perl script, replace all-WT with-W
That is: Replace the #!/usr/bin/perl–wt with the following: #!/usr/bin/perl–w
This is on behalf of PHP is a CGI test run in php.ini find Gi.force_redirect the front of the semicolon removed the value of the change to 0 on the line.

PS: Alternative Solutions
To modify the IIS settings, the Home Directory tab-> the application settings-> Select CGI and then add/edit the application extension mapping name: Write the CGI executable file name as:
D:\Perl\bin\perl.exe-x-wt '%s '%s
(Note: Here my Perl is installed in the D:\Perl directory)
You don't need to change the Bugzilla file like this.

Contact Us

The content source of this page is from Internet, which doesn't represent Alibaba Cloud's opinion; products and services mentioned on that page don't have any relationship with Alibaba Cloud. If the content of the page makes you feel confusing, please write us an email, we will handle the problem within 5 days after receiving your email.

If you find any instances of plagiarism from the community, please send an email to: info-contact@alibabacloud.com and provide relevant evidence. A staff member will contact you within 5 working days.

A Free Trial That Lets You Build Big!

Start building with 50+ products and up to 12 months usage for Elastic Compute Service

  • Sales Support

    1 on 1 presale consultation

  • After-Sales Support

    24/7 Technical Support 6 Free Tickets per Quarter Faster Response

  • Alibaba Cloud offers highly flexible support services tailored to meet your exact needs.