View previous topic :: View next topic |
Author |
Message |
Art01 -
Joined: 04 Jun 2009 Posts: 3 Location: Florida, USA
|
Posted: Thu Jun 04, 2009 1:19 pm Post subject: Error 500 and Broken Pipe |
|
|
Abyss X1 and Active Perl are installed and set up per following link:
http://www.aprelium.com/abyssws/perl.html
Receiving this error:
CGI.log
CGI: [C:\perl\bin\perl.exe -wT animal.cgi ] URI: /cgi-bin/basics/animal.cgi Broken pipe
Access.log
127.0.0.1 - - [03/Jun/2009:10:35:53 -0400] "POST /cgi-bin/basics/animal.cgi HTTP/1.1" 500 412 "" "Mozilla/5.0 (Windows; U; Windows NT 6.0; en-US; rv:1.9.0.10) Gecko/2009042316 Firefox/3.0.10"
Script:
Quote: | #!C:\Perl\bin\perl.exe
use strict;
use CGI ':standard';
my $animal;
$animal = param('animal');
print "Content-type: text/html\n\n";
print "Show me the $animal"; |
Pulling my hair out here and there wasn't that much to start with. I see others have had this problem and resolved it. Unfortunatly, they did not share "how" they resolved it.
Any help appreciated. |
|
Back to top |
|
|
aprelium-support -
Joined: 20 Feb 2009 Posts: 356
|
Posted: Thu Jun 04, 2009 4:01 pm Post subject: |
|
|
Art01,
Did you try your script standalone (not in Abyys Web Server)?
Is it correctly working?
Broken pipe means that the Perl process stopped working before sending anything to Abyss Web Server. Try turning full error logging in Perl to see if there are any meaningful error reports from the interpreter.
Can please post the line in CGI.log just above this one:
Quote: | CGI: [C:\perl\bin\perl.exe -wT animal.cgi ] URI: /cgi-bin/basics/animal.cgi Broken pipe |
It is the line that contains the error informations. _________________ Support Team
Aprelium - http://www.aprelium.com |
|
Back to top |
|
|
Art01 -
Joined: 04 Jun 2009 Posts: 3 Location: Florida, USA
|
Posted: Thu Jun 04, 2009 4:17 pm Post subject: |
|
|
Change parameter to -WT to get all warnings.
Still only one line returned to cgi.log
CGI: [C:\perl\bin\perl.exe -WT animal.cgi ] URI: /cgi-bin/basics/animal.cgi Broken pipe
Just the single line. No info above it except the previouse error.
the HTML page is passing an argument to perl as shown below.
Code: | <!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN"
"http://www.w3.org/TR/1999/REC-html401-19991224/loose.dtd">
<html>
<head>
<title>Animal</title>
</head>
<body>
<form action="http://127.0.0.1/cgi-bin/basics/animal.cgi" METHOD=POST>
Which animal? <INPUT type="text" name="animal">
<P><INPUT type="submit">
</form>
</body>
</html> |
It's actually a sample from a book and the code is the same on their website. |
|
Back to top |
|
|
aprelium-support -
Joined: 20 Feb 2009 Posts: 356
|
Posted: Thu Jun 04, 2009 4:34 pm Post subject: |
|
|
Try running your script directly from the command line and check the actual output they generate? What is it?
You are getting error 500 because Perl is having trouble with your script (mainly syntax errors).
We strongly recommend you to remove the first line from your script:
Quote: | #!C:\Perl\bin\perl.exe |
Please also double check the scripting parameters:
http://www.aprelium.com/abyssws/perl.html
If you’re still experiencing problems, please send your abyss.conf and CGI.log file to the support team:
http://www.aprelium.com/support/email/ _________________ Support Team
Aprelium - http://www.aprelium.com |
|
Back to top |
|
|
Art01 -
Joined: 04 Jun 2009 Posts: 3 Location: Florida, USA
|
Posted: Thu Jun 04, 2009 5:07 pm Post subject: |
|
|
OK. Very Strange.
IT WORKS!!!!
I actually tried it with
#!C:\Perl\bin
And this did not help.
I looked in Notepad++ and verified it was in ANSI format.
I deleted this cgi file and recreated it from scratch in ANSI format and still including
What I have discovered, is that the writer of the book was using a Unix or Linux system and the files use the Unix "newline" character. Perl on Windows apparently wants a CR LF combination.
Viewing the cgi files in Notepad++ they looked normal. In DOS edit and windows Notepad it was clear that they were one long line of text.
When I retyped the cgi files from within Windows, they received the proper CR/LF combination and now work. Or is that LF/CR??
Thanks to all who put some input into this. Had the original cgi files been ftp'd in ASCII mode this would have been a non-event. But they were in a zip file.
So, another lesson learned (or should I say relearned.) |
|
Back to top |
|
|
|