Home: Perl Programming Help: Beginner:
HTTP 500 - Internal server error



gregbugaj
Deleted

Mar 9, 2000, 10:31 AM


Views: 1661
HTTP 500 - Internal server error

Hi my name is Greg.

My problem is when I try to load cgi/pl scripts from the browser I recive this error
HTTP 500 - Internal server error. I have also used chmod 755 on script .

I use this test script

#!/usr/local/bin/perl

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

cure();

sub cure {

print "Hello, World...\n";

}

Thanks Greg Bugaj


Cretep
User

Mar 8, 2000, 11:09 PM


Views: 1661
Re: HTTP 500 - Internal server error

Hi Greg,
There are two main possible reasons why your script is not working.
(1) It's being uploaded in binary instead of ASCII. Alway's upload in ASCII.
(2) Your perl path may be incorrect. Check with you system administrator.

Best regards

Peter Crouch


perlkid
stranger

Mar 9, 2000, 2:43 AM


Views: 1661
Re: HTTP 500 - Internal server error

 
I tried it on my unix server and It worked fine. It worked also with &cure; instead of cure(); so maybe you could try that also.

perlkid


Cure
User

Mar 9, 2000, 1:56 PM


Views: 1661
Re: HTTP 500 - Internal server error

Hi

If your getting HTTP 500 - Internal server error.

1.Make sure your uploading the script in ASCII mode.
2. Make sure you have a http header.
3.Make sure you don have a syntax error.

put this code at the top of your script->this will print the error to your borwser instead of getting the 500 error.

use CGI::Carp qw/fatalsToBrowser/;


NOTE: To invoke a subroutine you have options.

you can do it this way
cure();
or you can do it this way
&cure;

Cure


gregbugaj
Deleted

Mar 10, 2000, 1:07 PM


Views: 1661
Re: HTTP 500 - Internal server error

Thanks guys for your help.

My paht was incorrect stupid mistake.

Greg