Go Back   HostGator Peer Support Forums > Public Forums > Suggestions

Notices

Reply
 
Thread Tools
  #1  
Old 05-05-2008, 05:58 PM
Shopgeek Shopgeek is offline
Hatchling Croc
 
Join Date: Mar 2008
Posts: 10
Default REALLY n00b CGI question

Goodafternoon,

Please excuse the CGI n00b question BUT, I just can't get it to run...

Script in question - perl.pl
#!/usr/bin/perl -w
print "Hello, World.\n";

It is saved in my public_html/cgi-bin subdir

When I attempt to run it using, via browser:

mydomain.com/cgi-bin/perl.pl

I receive an "Internal Server Error".

What blatantly obvious thing am I doing wrong?

Many thanks.
Reply With Quote
  #2  
Old 05-05-2008, 05:59 PM
Goddess Dix's Avatar
Goddess Dix Goddess Dix is offline
King Croc
 
Join Date: Aug 2006
Location: KS, USA
Posts: 1,498
Default Re: REALLY n00b CGI question

make sure you uploaded in the proper format, and check the permissions on the script. should be 755, most likely.

add: uploaded in ascii, not binary.
Reply With Quote
  #3  
Old 05-05-2008, 06:04 PM
Shopgeek Shopgeek is offline
Hatchling Croc
 
Join Date: Mar 2008
Posts: 10
Default Re: REALLY n00b CGI question

Yeah, script perms set to 0755, and FTP'd using ASCII switch -- still gettin' Internal Server Error.

Last edited by Shopgeek; 05-05-2008 at 06:07 PM.
Reply With Quote
  #4  
Old 05-05-2008, 06:15 PM
GvilleRick's Avatar
GvilleRick GvilleRick is offline
Emperor Croc
 
Join Date: Jan 2007
Location: Greenville, SC
Posts: 3,128
Default Re: REALLY n00b CGI question

Try adding the second line in the code below.

Code:
#!/usr/bin/perl -w
print "Content-type: text/plain\n\n";
print "Hello, World.\n";
Reply With Quote
  #5  
Old 05-05-2008, 06:21 PM
Shopgeek Shopgeek is offline
Hatchling Croc
 
Join Date: Mar 2008
Posts: 10
Default Re: REALLY n00b CGI question

That got it. Thanks GvilleRick.
Reply With Quote
Reply

Bookmarks

Thread Tools

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is Off
HTML code is Off

Forum Jump

All times are GMT -6. The time now is 04:25 AM.