Running a perl Script
Posted: Sun Jul 13, 2003 9:15 pm
Hello. Before I start with my problem, let me point out that I have never used perl before. That's right never even ran a perl script. I'm a PHP man, but I have come to a point where I need to use Perl.
So I have a perl script, and I have no idea what to do with it. I uploaded to a directory first, ran it, got a 500 error. Uploaded it to the cgi-bin directory, 500 error. Did some reaserch (
) and chmodded it to 755. Got this error:
Well if running it as CGI is wrong, what do I do? If I need to set up a cron job, someone please tell me exactly what to put in.
If anyone is wondering, this is the SquirrelMail set-up script. Yes, I know there is a config.php file. Yes, I have edited it to fit my needs. But I still want to run this script. But how?
Thanks.
Cheers!
So I have a perl script, and I have no idea what to do with it. I uploaded to a directory first, ran it, got a 500 error. Uploaded it to the cgi-bin directory, 500 error. Did some reaserch (
At this point I thought that I was screwed because i don't have command-line access to the server (other than a cron job). I am on a shared hosting platform. But then I dug into the code and found this:You must run this script from the command line.
Code: Select all
############################################################
# Some people try to run this as a CGI. That's wrong!
############################################################
if ( defined( $ENV{'PATH_INFO'} )
|| defined( $ENV{'QUERY_STRING'} )
|| defined( $ENV{'REQUEST_METHOD'} ) ) {
print "Content-Type: text/html\n\n";
print "You must run this script from the command line.";
exit;
}If anyone is wondering, this is the SquirrelMail set-up script. Yes, I know there is a config.php file. Yes, I have edited it to fit my needs. But I still want to run this script. But how?
Thanks.
Cheers!