NameSilo

500 error on CGI scripts

SpaceshipSpaceship
SpaceshipSpaceship
Namecheap AuctionsNamecheap Auctions
Watch

Keral_Patel

I'll do itRestricted (Chatroom)
Impact
1,450
Hello friends,

I have one script that uses CGI.

But when uploaded it gave me 500 error.

So I decided to upload just a simple file something like this.

Code:
#!/usr/bin/perl

print "Content-type: text/html\n\n";
print "Hello<br><br>";
print "<br><br>\n";

But it is still giving me 500 error.

I have checked :
1) That the URL is not case sensitive.
2) That the file permission is 755 and the cgi-bin directory is also 755.
3) I have checked that there is a ScriptAlias for the particular domain in httpd.conf
4) Plus I have checked that the script above is also working on another shared server but not on this server.
5) And yes the script was uploaded in ASCII.

So I don't know exactly how to fix this. Can someone help me or give me some idea what should I do next.

Thanks.
 
0
Close
The views expressed on this page by users and staff are their own, not those of NamePros.
GoDaddyGoDaddy
Check your Apache error log. If you see a 500 error, nine times out of ten there's a meaningful error message in your Apache log.
 
0
Close
What method are you using to upload the file(s)?
 
0
Close
try on command line: ($ is your prompt)

$ perl -wc scriptname.pl

it will track script's syntax error without running it if not
then make sure you only upload to domain.com/cgi-bin/

also make sure this path is correct:
#!/usr/bin/perl

on ssh run this command:
$ which perl

to locate your perl's path




-Nick- said:
Hello friends,

I have one script that uses CGI.

But when uploaded it gave me 500 error.

So I decided to upload just a simple file something like this.

Code:
#!/usr/bin/perl

print "Content-type: text/html\n\n";
print "Hello<br><br>";
print "<br><br>\n";

But it is still giving me 500 error.

I have checked :
1) That the URL is not case sensitive.
2) That the file permission is 755 and the cgi-bin directory is also 755.
3) I have checked that there is a ScriptAlias for the particular domain in httpd.conf
4) Plus I have checked that the script above is also working on another shared server but not on this server.
5) And yes the script was uploaded in ASCII.

So I don't know exactly how to fix this. Can someone help me or give me some idea what should I do next.

Thanks.
 
Last edited:
0
Close
AIVikingsAIVikings

We're social

Escrow.com
Spaceship
Domain Recover
CryptoExchange.com

NamePros updates

A browser tab with a favicon next to the page title
Search members
You can now search for members by name, company, location and more. Open the search at the top of any page and choose Members. You will...
AIVikings
Catchy
  • The sidebar remains visible by scrolling at a speed relative to the page’s height.
Back