Jump to content

Recommended Posts

Posted

I'm trying to run pisg which is a perl script. The documentation says to run the script via shell, but I chmod'd the script to 755 (executable) so it should be running just from going to the file, right? I'm getting a 500 error for some reason and I can't figure out why. The script is at http://www.cl58services.co.cc/pisg/pisg.pl and you can see the code of the script at http://www.cl58services.co.cc/pisg/pisgcode

Posted

Add this near the top of your script:

 

BEGIN { 
use CGI::Carp qw(carpout); 
use diagnostics;
open(LOG, ">errors.txt"); 
carpout(LOG);
close(LOG);
}

use CGI::Carp qw(fatalsToBrowser);

 

And see if you get any errors written to the errors.txt file.

 

Guest Geoff
Posted

root@stevie [/home/cl58/public_html/cl58services.co.cc/pisg]# ./pisg.pl
pisg v0.72 - Perl IRC Statistics Generator

Using config file: pisg.cfg

Statistics for channel #sv @ irc.mozilla.org by MAINTAINER

1 logfile(s) found, using mIRC format...

Analyzing log svlog.log... 0 days, 0 lines total
Channel analyzed successfully in 00 hours, 00 minutes and 00 seconds on Sun Jun  5 09:38:32 2011

 

 

 

Maybe you need to output HTTP headers first.

Guest Geoff
Posted

Well, Perl is one of the few scripting languages that I have not learned, so I just copied this off the internet:

 

 

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

Create an account or sign in to comment

You need to be a member in order to leave a comment

Create an account

Sign up for a new account in our community. It's easy!

Register a new account

Sign in

Already have an account? Sign in here.

Sign In Now
×
×
  • Create New...