subdomain cgi-bin 500 error

Status
Not open for further replies.

sirduncan

New Member
Messages
40
Reaction score
0
Points
0
I setup a subdomain (newsub.sirduncan.com), the system setup the folder for me. Within that 'sub' folder, the system also created a cgi-bin folder. I place a hello world perl script, change permissions to 777 and I get a 500 error. Further, the error does not seem to show up in my error log.

Any ideas?
 

descalzo

Grim Squeaker
Community Support
Messages
9,373
Reaction score
326
Points
83
1. cgi-bin permissions set to 0755?
2. Extension of the file?
3. File not uploaded from Windowz machine in binary?
4. Much different from:

Code:
#! /usr/bin/perl

use strict ;
use CGI::Carp qw(fatalsToBrowser);


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


print "<HTML>\n";
print "<HEAD><TITLE>Hello World!</TITLE></HEAD>\n";
print "<BODY>\n";
print "<H2>Hello World!</H2> <br /> \n";


print "</BODY>\n";
print "</HTML>\n";

5. For security purposes, set the file permissions to 0755. Unless you have a real good reason, never have an executable file world writeable.
 

sirduncan

New Member
Messages
40
Reaction score
0
Points
0
Thank you descalzo. I don't know what the difference was, but the helloworld cgi is now working under that sudomain. Do you know if the strict and Carp are both required in every script?
 

descalzo

Grim Squeaker
Community Support
Messages
9,373
Reaction score
326
Points
83
Neither are required.

strict is considered good programming practice (helps catch some misspellings).

The Carp is good because it prints out more information when there is an error. Good for debugging, not necessary once code is in production (might print out too much info)
 

Zubair

Community Leader
Community Support
Messages
8,766
Reaction score
305
Points
83
No reply From the Original poster from past 3 days. So I am going to close this thread. If the problem is still there Feel free to create a new thread.

***Thread Closed***
 
Status
Not open for further replies.
Top