Broken Pipe error

 
Post new topic   Reply to topic    Aprelium Forum Index -> Perl
View previous topic :: View next topic  
Author Message
Coolhand2
-


Joined: 27 May 2004
Posts: 5

PostPosted: Sun Jan 08, 2006 5:48 am    Post subject: Broken Pipe error Reply with quote

Code for file "Hello_World.pl":
Code:
print 'Hello World.';

Quote from log/cgi.log:
Quote:
CGI: [C:\Perl\bin\perl.exe Hello_World.pl ] URI: /PERL/Hello_World.pl Broken pipe

My settings are to NOT resolve interpreter through shebang line, nor the Windows registry.
My interpreter path is set to C:\Perl\bin\perl.exe with no arguments
It's set to interpret both .pl and .cgi files.
I have gone through your installation procedure twice and have gotten the same error both times...

Aaaaaand, I have no idea what to do...
Back to top View user's profile Send private message
TRUSTAbyss
-


Joined: 29 Oct 2003
Posts: 3752
Location: USA, GA

PostPosted: Sun Jan 08, 2006 5:59 am    Post subject: Reply with quote

Your script is wrong! You didn't add the correct header before sending the
content. PHP automaticly sends the text/html content, perl doesn't. LateR!

Your code should include the Content-Type header for all output.

Code:
print "Content-Type: text/html\n\n";
print "Hello, World!";


Sincerely, TRUSTpunk
Back to top View user's profile Send private message Visit poster's website
Coolhand2
-


Joined: 27 May 2004
Posts: 5

PostPosted: Sun Jan 08, 2006 10:05 pm    Post subject: Reply with quote

*buzzer* Wrongo, chongo.
Tried that and: *drum roll*
I'm still getting a 500 error on this...
I've tried getting it from the registry now too. Still the same 500.

The tutorial I'm getting this from has the code like this:
Code:
#!/usr/local/bin/perl
#
# Program to do the obvious
#
print 'Hello world.';      # Print a message

I edited that a bit, to just the print statment without the comment. It's now like that again only instead of "/usr/local/bin/perl" for the shebang line, I have had it set to: C:\Perl\bin\perl, C:\Perl\bin, C:\Perl\bin\, C:\Perl\bin\perl.exe

Again, I am totally lost on this one...
Back to top View user's profile Send private message
AbyssUnderground
-


Joined: 31 Dec 2004
Posts: 3855

PostPosted: Mon Jan 09, 2006 12:04 am    Post subject: Reply with quote

Try

Code:
#!/usr/local/bin/perl
#
# Program to do the obvious
#
use CGI ':standard';

print header;

print "Hello World";

_________________
Andy (AbyssUnderground) (previously The Inquisitor)
www.abyssunderground.co.uk
Back to top View user's profile Send private message Visit poster's website
TRUSTAbyss
-


Joined: 29 Oct 2003
Posts: 3752
Location: USA, GA

PostPosted: Mon Jan 09, 2006 4:39 am    Post subject: Reply with quote

If you add me to your MSN Messenger, I can help you. The code I posted is in
most Perl "Hello, World!" scripts. Without the Content-Type, it won't work, but if
you add the Content-Type, it will work. Please check your settings.

Note: Keep in mind that some Perl scripts only work on the command line. This
maybe the case in your situation. Your perl should be working. I know you have
a mistake in your configuration. Add me to your MSN and I will prove it.

Im sure you made a mistake somewhere along the lines.

Sincerely, TRUSTpunk
Back to top View user's profile Send private message Visit poster's website
Coolhand2
-


Joined: 27 May 2004
Posts: 5

PostPosted: Tue Jan 10, 2006 1:52 am    Post subject: Reply with quote

Ok, I did The Inquisitors' deal with setting the header and printing it out, and it worked. Now, if there's some configuration deal that I can have where I don't have to do that for every single script that I write, you're on my contacts list and I'll IM you next time you're on TRUSTpunk...

Until then, I need to start learning some more PERL.
Back to top View user's profile Send private message
Display posts from previous:   
Post new topic   Reply to topic    Aprelium Forum Index -> Perl All times are GMT + 1 Hour
Page 1 of 1

 
Jump to:  
You cannot post new topics in this forum
You cannot reply to topics in this forum
You cannot edit your posts in this forum
You cannot delete your posts in this forum
You cannot vote in polls in this forum


Powered by phpBB phpBB Group