Mel Posted July 27, 2003 Posted July 27, 2003 ~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 Quote
TCH-Sales Posted July 27, 2003 Posted July 27, 2003 Hmm.. could you give us more information about this perl program your trying to run? Quote
Mel Posted July 27, 2003 Author Posted July 27, 2003 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"; Quote
borfast Posted July 27, 2003 Posted July 27, 2003 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 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. Quote
Mel Posted July 27, 2003 Author Posted July 27, 2003 It should work, now 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. Quote
borfast Posted July 27, 2003 Posted July 27, 2003 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 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 Quote
TCH-Rick Posted July 27, 2003 Posted July 27, 2003 The original script will work fine from the command line or shell but you need to define the output as html text for it to work in a browser. Quote
Recommended Posts
Join the conversation
You can post now and register later. If you have an account, sign in now to post with your account.