Welcome to WebmasterWorld Guest from 54.204.198.71

Forum Moderators: coopster & jatar k & phranque

Message Too Old, No Replies

perl on networksolutions win server errors

     
1:07 pm on Jul 10, 2011 (gmt 0)

New User

5+ Year Member

joined:July 10, 2011
posts:5
votes: 0


Hello, I recently had to move a working site that used perl and an access DB. we had to take over the site and move it to a new host. now none of the scripts work.

this is the error

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

any help would be appreciated.
11:50 pm on July 10, 2011 (gmt 0)

Administrator

WebmasterWorld Administrator phranque is a WebmasterWorld Top Contributor of All Time 10+ Year Member Top Contributors Of The Month

joined:Aug 10, 2004
posts:10597
votes: 22


welcome to WebmasterWorld, migzam!

where did this error appear?
do you have access to the server error log file?
are you able to run the script from the command line on that server?
3:36 am on July 11, 2011 (gmt 0)

New User

5+ Year Member

joined:July 10, 2011
posts:5
votes: 0


i dont have access to log or command prompt. the url is [artisthelpnetwork.com...]
7:08 am on July 11, 2011 (gmt 0)

Administrator

WebmasterWorld Administrator phranque is a WebmasterWorld Top Contributor of All Time 10+ Year Member Top Contributors Of The Month

joined:Aug 10, 2004
posts:10597
votes: 22


what status code are you getting with the HTTP response?
1:51 pm on July 11, 2011 (gmt 0)

New User

5+ Year Member

joined:July 10, 2011
posts:5
votes: 0


just the above error a general cgi error

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

they are tied to this hosting company and they offer no help at all. only that we can cancel the account.
3:55 pm on July 11, 2011 (gmt 0)

Senior Member

WebmasterWorld Senior Member rocknbil is a WebmasterWorld Top Contributor of All Time 10+ Year Member

joined:Nov 28, 2004
posts:7999
votes: 0


That is a generic and largely unhelpful error, similar to the 500 on Apache. What this most likely means is the script is either 500 erroring (an actual error) or it's just not outputting anything (just dieing.) On any request, a script must print a content-type header and output something to STDOUT (i.e., send a response back to the browser.) How you'd get to the root of it . . .

First, was it on Linux before? The windows environment is different for windows servers, especially in respect to permissions. Perl scripts need to be set executable, and chmod is not a Linux command. So you'll have to log in to your hosting CP to set those executable. If there are any files that need to be written, they need to be in a directory that is writable.

Next, always know what the environment variables are or even if you can execute scripts "from where you are" (this is particularly fussy on windows servers.) Add this little script somewhere - but REMOVE it as soon as you have the info:

#!/usr/bin/perl
print "content-type: text/html\n\n";
foreach $var (sort keys %ENV) { print qq|KEY: $var VAL: $ENV{$var}<br>\n|; }

If this won't run - see comments about executable. Once you get the envars script running, one of the important ones to note is DOCUMENT_ROOT. This is the full path to your server's root, and may be incorrect in your script configuration - open any config files to verify.

Last, once you get the environment variable script running, without access to error logs or other tools, you can begin debugging like so. Add the following three lines somewhere near the top of the script after #!/usr/bin/perl

print "content-type:text/html\n\n";
print "checkpoint one";
exit 0;

If that prints to the screen, you can remove it and move farther down in the script to identify the point at which it dies until you find the first stumbling block.

That is where you start, the info you glean from there will lead you to the specific problems you'll need to adjust.
5:31 pm on July 11, 2011 (gmt 0)

New User

5+ Year Member

joined:July 10, 2011
posts:5
votes: 0


thank you rocknbil, i will try that code. this was hosted on a windows server for aboit 5 years without any issues. they forgot to renew it and the host canceled their account. now they set it up on netsolultions on a windows server.

they tell us that our scripts have issues but... how can that be if they ran for years. the old host no longer does windows on linux so they had to do netsol who claim they have no logs to show on a hosted account.

i appreciate your help!
12:38 am on July 12, 2011 (gmt 0)

Administrator

WebmasterWorld Administrator phranque is a WebmasterWorld Top Contributor of All Time 10+ Year Member Top Contributors Of The Month

joined:Aug 10, 2004
posts:10597
votes: 22


just the above error a general cgi error

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

that's an error document, not the status code.
the status code would be a 3 digit number, such as:
200 OK
404 Not Found
502 Bad Gateway
...like that...

HTTP/1.1: Status Code Definitions:
http://www.w3.org/Protocols/rfc2616/rfc2616-sec10.html [w3.org]
1:10 am on July 12, 2011 (gmt 0)

New User

5+ Year Member

joined:July 10, 2011
posts:5
votes: 0


no that's the entire message that comes up on the browser and that's the most frustrating thing about this. the hosting company wont provide one bit of information.
4:38 am on July 12, 2011 (gmt 0)

Administrator

WebmasterWorld Administrator phranque is a WebmasterWorld Top Contributor of All Time 10+ Year Member Top Contributors Of The Month

joined:Aug 10, 2004
posts:10597
votes: 22


on firefox you can install the LiveHTTPHeaders plugin:
http://livehttpheaders.mozdev.org/ [livehttpheaders.mozdev.org]

that should show you the HTTP Response status code and all the HTTP response headers.
 

Join The Conversation

Moderators and Top Contributors

Hot Threads This Week

Featured Threads

Free SEO Tools

Hire Expert Members