Whopub
02-28-2006, 01:56 AM
Hi,
I recently moved a site from a NT machine to a linux account. I have 2 tailor made scripts that have been running for years. They were made when I was still using unix, then I moved to a NT account and, after some tweaking, the scripts kept working.
Now that I'm back to linux I can't make them work! Server support doesn't really bother to help since the problem is on my script not on their server... You know the drill.
Anyway, I'll start with one script and then I'll explain the other later, hopefully after this first one is working.
This first script is actually very simple, or so it seems, since I don't know the first things about cgi... What it does is it creates a cookie using a validation key stored on another file.
Here's the code:
#!/usr/local/bin/perl
use strict;
use CGI qw(:standard escapeHTML -no_debug);
my $cookie = cookie ( -NAME => "pass",
-VALUE => "16f89ea150f13792242b7e79f64b1ac2",
-EXPIRES => "+2y");
print header(-COOKIE => $cookie), start_html(),p("cookie created"),end_html();
The perl path should be correct. It was indicated by the server support people.
The 'pass' file (where it gets the validation key from) is located at the exact same
dir (cgi-bin).
The cgi-bin is CHMODed to 755, and so are the script itself and the 'pass' file.
The error message I get reads the following:
500 Internal Server Error
The server encountered an internal error or misconfiguration and was unable to complete your request.
More information...
Operating system: Linux
Kernel version: 2.6.15.4-AMDv7
Machine Type: x86_64
Apache version: 1.3.34 (Unix)
PERL version: 5.8.5
Path to PERL: /usr/bin/perl
PHP version: 4.4.1
cPanel Build: 10.8.1-RELEASE 113
The server belongs to http://www.skynethosting.net/
It's a cheap VIP account.
I'd really appreciate if any of you experts could take a look at this code and try to figure out what's wrong. It's probably basic, but I really don't know the first thing about cgi, perl, or anything besides html.
Thank you for your time.
Best regards,
Whopub
I recently moved a site from a NT machine to a linux account. I have 2 tailor made scripts that have been running for years. They were made when I was still using unix, then I moved to a NT account and, after some tweaking, the scripts kept working.
Now that I'm back to linux I can't make them work! Server support doesn't really bother to help since the problem is on my script not on their server... You know the drill.
Anyway, I'll start with one script and then I'll explain the other later, hopefully after this first one is working.
This first script is actually very simple, or so it seems, since I don't know the first things about cgi... What it does is it creates a cookie using a validation key stored on another file.
Here's the code:
#!/usr/local/bin/perl
use strict;
use CGI qw(:standard escapeHTML -no_debug);
my $cookie = cookie ( -NAME => "pass",
-VALUE => "16f89ea150f13792242b7e79f64b1ac2",
-EXPIRES => "+2y");
print header(-COOKIE => $cookie), start_html(),p("cookie created"),end_html();
The perl path should be correct. It was indicated by the server support people.
The 'pass' file (where it gets the validation key from) is located at the exact same
dir (cgi-bin).
The cgi-bin is CHMODed to 755, and so are the script itself and the 'pass' file.
The error message I get reads the following:
500 Internal Server Error
The server encountered an internal error or misconfiguration and was unable to complete your request.
More information...
Operating system: Linux
Kernel version: 2.6.15.4-AMDv7
Machine Type: x86_64
Apache version: 1.3.34 (Unix)
PERL version: 5.8.5
Path to PERL: /usr/bin/perl
PHP version: 4.4.1
cPanel Build: 10.8.1-RELEASE 113
The server belongs to http://www.skynethosting.net/
It's a cheap VIP account.
I'd really appreciate if any of you experts could take a look at this code and try to figure out what's wrong. It's probably basic, but I really don't know the first thing about cgi, perl, or anything besides html.
Thank you for your time.
Best regards,
Whopub