marty.net 1001 Postcards Love Love Love Meep Meep ZenZodiac DailyQuotation

YOU ARE HERE:
not returning a complete set of HTTP headers

HOME

CPSHOP|

|

|

EMAIL MARTY
  marty.net message board
  « not returning a complete set of HTTP headers »
Welcome, Guest. Please Login or Register.
12/18/17 at 07:01:28
Home Help Search Login Register
   marty.net message board
   About cpshop
   Installation Help
   not returning a complete set of HTTP headers
(Moderator: Marty)
Pages: « 1 2 3 4 » Reply Notify of replies Send the topic Print 
   Author  Topic: not returning a complete set of HTTP headers  (Read 166334 times)
Marty
Administrator Dragon
*****

Gender: male
Posts: a whole lot



That's me. :)
   

WWW E-Mail
Re: not returning a complete set of HTTP headers
« Reply #30 on: 10/19/05 at 10:36:33 »
Reply with quote Modify message

Go to the download area, use your username and password to download the newest update version of the script (whichever one is appropriate for your server), unzip the contents, and FTP them (in ASCII/text mode) to your cpshop install directory.
Logged

--
Regards,
Marty·.¸¸.·´¯`·.¸¸.-> marty@marty.net
acidburn
Green Dragon
*

Posts: 2



Go Scots!
   

E-Mail
Re: not returning a complete set of HTTP headers
« Reply #31 on: 10/19/05 at 10:50:09 »
Reply with quote Modify message

Thank You!

But, it seems that I am a complete idiot.

I came across this forum with a google search. I am having this problem with my own perl/cgi script. I am desperately searching for help. But I am getting nowhere.

Thanks for your help, but I guess I stumbled into the wrong place. Sorry.
Logged
Marty
Administrator Dragon
*****

Gender: male
Posts: a whole lot



That's me. :)
   

WWW E-Mail
Re: not returning a complete set of HTTP headers
« Reply #32 on: 10/19/05 at 11:14:43 »
Reply with quote Modify message

Well, I can't explicitly help you, but I can give you general advice.

Usually when you get this type of error, it means your script is printing out text without printing headers first.

Before your script can print out any text, it must print out headers that tell the browser what to do with the text.

For example:

If I had a perl script that looked like this:

Code:
#!/usr/bin/perl
print "Hello world!\n";

and I tried to access it from the web, I'd get the error that the page was not returning a complete set of HTTP headers.

If, on the other hand, my perl script looked like this:

Code:
#!/usr/bin/perl
print "Content-Type: text/html\n\n";
print "Hello world!\n";

the script would run just fine, and I'd see "Hello world!" printed on the page.

Note the two \n's after the Content-Type header.  That's because headers are separated from the rest of the content by a blank line.  If you were to look at the output of the program, it would look like this:

Code:
Content-Type: text/html

Hello world!

If there were other headers you wanted to add, you could add them after the Content-Type header:

Code:
Content-Type: text/html
MyHeader: my header content
MyHeader2: more header content

Hello world!


One way to debug a program that has this sort of error is to add the line:

print "Content-Type: text/plain\n\n";

to the top of your script, and then run it.  See what gets printed out.  Anything that's printed to the screen before you can actually see a Content-Type header appear is going to break your script.

Then, for example, if your output (from a browser) looks like this:

Code:
This is random text.
Content-Type: text/html

<html>
<a href="blah.html">Blah!</a>
</html>

Then the problem is that "This is random text" was printed to the screen before the "Content-Type: text/html" header.

Anyway, hope this helps, and good luck.
Logged

--
Regards,
Marty·.¸¸.·´¯`·.¸¸.-> marty@marty.net
acidburn
Green Dragon
*

Posts: 2



Go Scots!
   

E-Mail
Re: not returning a complete set of HTTP headers
« Reply #33 on: 10/19/05 at 11:22:54 »
Reply with quote Modify message

Thanks so much.

I am using the header.

The problem is that the perl script works ok, but some of the forms don't work. I am trying to find a pattern, because some of them work the way they are suppose to and then some give me this error.

They all worked just fine on my development machine and on a different server. They were Win Xp and Win2000 server. Now I am on Win2003 Server and it is hit and miss.

Thanks again for your help!!
Logged
Au
Guest

E-Mail
Re: not returning a complete set of HTTP headers
« Reply #34 on: 11/15/05 at 07:18:39 »
Reply with quote Modify message

Hello All!!!

I have just fixed the problem. I use IIS and Perl with HTML-Mason and Cache. When I tried to do POST with File object, I got the error...

The solution is simple: just create the "\Temp" folder in your root directory and share access to all (guest) users. Now the IIS and Perl can swap temp files there and everything works fine!

I hope, my expirience will help anybody...
Logged
Solburn
Green Dragon
*

Posts: 1



Go Scots!
   

E-Mail
Re: not returning a complete set of HTTP headers
« Reply #35 on: 06/09/06 at 07:04:52 »
Reply with quote Modify message

Just wanted to say thanks to everyone for posting their info. It turns out the link posted by robbiebow (below) solved my issues.

THANKS!


http://support.microsoft.com/default.aspx?scid=kb;EN-US;884764
Logged
MisterX
Green Dragon
*

Posts: 2



Go Scots!
   

Re: not returning a complete set of HTTP headers
« Reply #36 on: 07/31/06 at 21:20:32 »
Reply with quote Modify message

Here's how I found out that my web hosting company did not install the kb for the intermittent issue.

I ran this small script on the web server to see if the kb patch was installed

I think the web hosting company will have to install this.

Some folks might find this useful....

http://support.microsoft.com/default.aspx?scid=kb;en;884764

use Win32::TieRegistry(Delimiter=>"/");
$retval = 0;
$patch = "KB884764";
$retval = CHKPATCH($patch);

if ($retval)
{
    print "patch $patch is installed<BR>";

}
else
{

    print "patch $patch is NOT installed<BR>";

}
sub CHKPATCH
{
     my $hotfix;
     if($hotfix=$Registry-> {"LMachine/SOFTWARE/Microsoft/Windows NT/CurrentVersion/HotFix/$_[0]"})
     {
         return 1;
     }
     else
     {
       return 0;
     }  
   
}
Logged
ashwanikabra
Green Dragon
*

Gender: male
Posts: 3



Go Scots!
   

Re: not returning a complete set of HTTP headers
« Reply #37 on: 08/01/06 at 05:07:23 »
Reply with quote Modify message

hi ,
i'm getting the same error .
i'm working on windowsxp and Using IIS.
i created exe of perlscript i.e.
made search.exe from search.cgi(perl script)
through PDK(Perl Developement Kit)
and upload it on my local server
it is a simple script.
my first page is html page having hello world in body and a button.
on click on button i'm calling this search.exe
but it is giving the similar cgi error
i.e. The specified CGI application misbehaved by not returning a complete set of HTTP headers. The headers it did return are:

now i'm not getting where did i wrong...

tell me how can we resolve it.?

Thanks in advance

ashwani
Logged
MisterX
Green Dragon
*

Posts: 2



Go Scots!
   

Re: not returning a complete set of HTTP headers
« Reply #38 on: 08/01/06 at 10:16:21 »
Reply with quote Modify message

ashwani,

I'm not sure. I've never tried anything like that.

One thing I have seen documentation on indicates that the first print of your program should have the following (including the two new lines) or you may also receive a similar cgi header error. Good luck

print "Content-type: text/html\n\n";
Logged
HyperText_Transfer
Green Dragon
*

Posts: 1



Go Scots!
   

Re: not returning a complete set of HTTP headers
« Reply #39 on: 01/27/07 at 16:00:03 »
Reply with quote Modify message

does anyone know how to fix this problem in phpMyAdmin 2.6.2?
Logged
Naudy_J
Green Dragon
*

Posts: 1



Go Scots!
   

E-Mail
Re: not returning a complete set of HTTP headers
« Reply #40 on: 05/15/07 at 02:56:58 »
Reply with quote Modify message

Try:

print "Content-type: text/html\n\n";
print "<FONT FACE='verdana' SIZE='1'>\n";

print "Hello from Naudy J!\n";
Logged
jonsablue
Green Dragon
*

Posts: 1



Go Scots!
   

E-Mail
Re: not returning a complete set of HTTP headers
« Reply #41 on: 04/16/08 at 12:48:53 »
Reply with quote Modify message



on 08/03/04 at 09:32:30, Srini wrote:
access the Internet Services Manager through the following path:

Start->Settings->Control Panel->Administrative Tools->Internet Services
Manager.

Then expand the tree until you see "Default Web Site" and right-click on it and select Properties. Then select the "Home Directory" tab, then click on the "Configuration..." button under "Application Settings."

Now you'll see the "Application Configuration" dialog, where the "App Mappings" tab should be active. Scroll through the list and find the one for ".pl", then click on Edit.

You will want to keep the file path, but change the perl.exe to "perlis.dll". And remove the "%$" after the file name.

Save your changes and then restart your web server to ensure the changes take affect and hopefully that will give you better luck with avoiding those random CGI errors.


Srini you are a LEGEND! I have been trying to get my scripts working with IIS7 for two WHOLE days now and you suggestion has fixed it. Your a genius sir thank you SO much!  
Logged
stuffnthingz
Green Dragon
*

Posts: 3




   

E-Mail
Re: not returning a complete set of HTTP headers
« Reply #42 on: 05/12/08 at 15:07:32 »
Reply with quote Modify message

My particular issue of incomplete HTTP Headers appears to be a path problem and I cannot figure out what the correct path would be to resolve it.

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

Can't locate cplogin.lib in @INC (@INC contains: C:/perl/lib C:/perl/site/lib .) at C:\Domains\stuffnthingz.com\wwwroot\cgi-bin\sntgifts\cpadmin.pl line 34.

The cplogin.lib is in my cgi-bin/sntgifts folder, so how do I update @inc to know it should also look there? I figured this would be part of the script.

Sorry Marty, I sent this in an email to you today and then finally got my message board account working...
Logged
Marty
Administrator Dragon
*****

Gender: male
Posts: a whole lot



That's me. :)
   

WWW E-Mail
Re: not returning a complete set of HTTP headers
« Reply #43 on: 05/12/08 at 18:02:51 »
Reply with quote Modify message

Update the $script_dir variable at the top of cpadmin.pl and cpshop.pl.

$script_dir = "C:/Domains/stuffnthingz.com/wwwroot/cgi-bin/sntgifts/";
Logged

--
Regards,
Marty·.¸¸.·´¯`·.¸¸.-> marty@marty.net
Alfi
Guest

E-Mail
Re: not returning a complete set of HTTP headers
« Reply #44 on: 03/11/10 at 01:38:34 »
Reply with quote Modify message

 HI, I just had php installed on win server2003. then browsed http://localhost/php.php, the browse threw a prompt "page no found" to me. after examined, I found there was no Script Map for .php. so I added it manually. however I currently get the error "The specified CGI application misbehaved by not returning a complete set of http headers". how can i resolve this? thx.

Regards
Alfi
« Last Edit: 03/11/10 at 01:43:51 by Alfi » Logged
Pages: « 1 2 3 4 » Reply Notify of replies Send the topic Print 
Jump to:


marty.net message board (http://www.marty.net/cgi/marty/board/messageboard)

Powered by YaBB 1 Gold - Release (Yet Another Bulletin Board)
Copyright © 2000-2001, X-Null. All Rights Reserved.