Jump to content

Recommended Posts

Posted

~Ola,

 

Loaded a sample perl program: http://sunsethosting.com/cgi-bin/hello.pl containing the following lines of highly optimized code:

 

#!/usr/bin/perl

print "Hello, world!\n";

 

chmod'd to 755

 

Getting 500 Internal Server Error.

 

Uploaded in binary & ascii, deleted white space at end of lines....

 

 

Suggestions?

 

 

 

Mel

Posted
Hmm.. could you give us more information about this perl program your trying to run?

That's it man... 2 lines:

 

 

#!/usr/bin/perl

print "Hello, world!\n";

Posted

Someone else had this problem too:

http://www.totalchoicehosting.com/forums/i...ic=3036&hl=perl

 

Basically, add the following code after the #!/usr/bin/perl line:

 

print "Content-type: text/html\n\n";

 

It should work, now :P

 

 

EDIT: Ignore this for a while, I thought this was the solution for the problem but it doesn't seem to be - I just read the rest of the thread I linked to.

I'll update this when I have some more info.

Posted
It should work, now :P

yup yup... she works now..

 

Now I gotta figure out 'why'...

 

thank you sir.

 

 

Thumbs Up

 

 

EDIT: Ignore this for a while, I thought this was the solution for the problema but it doesn't seem to be - I just read the rest of the thread I linked to.
Actually, it did work for me. Thanks again.
Posted

Well, glad it works. I thought it wouldn't work because I read someone saying on the other thread that it didn't work for them but on the other hand, when I read that thread, I recall trying that and it fixed the problem, so I was a little confused :P

 

As to the 'why' part, I can't tell you for sure, since I know almost nothing about PERL but I'd guess that the PERL interpreter doesn't output the HTTP MIME type by default and Apache doesn't put it in either, so in order for the script to work correctly, the MIME type has to be output.

 

Anyway, good scripting :P

Join the conversation

You can post now and register later. If you have an account, sign in now to post with your account.

Guest
Unfortunately, your content contains terms that we do not allow. Please edit your content to remove the highlighted words below.
Reply to this topic...

×   Pasted as rich text.   Paste as plain text instead

  Only 75 emoji are allowed.

×   Your link has been automatically embedded.   Display as a link instead

×   Your previous content has been restored.   Clear editor

×   You cannot paste images directly. Upload or insert images from URL.

×
×
  • Create New...