Jump to content

Confused...


cl58

Recommended Posts

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

Link to comment
Share on other sites

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.

 

Link to comment
Share on other sites

Guest Geoff

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.

Link to comment
Share on other sites

Guest Geoff

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";

Link to comment
Share on other sites

Join the conversation

You can post now and register later. If you have an account, sign in now to post with your account.

Guest
Reply to this topic...

×   Pasted as rich text.   Paste as plain text instead

  Only 75 emoji are allowed.

×   Your link has been automatically embedded.   Display as a link instead

×   Your previous content has been restored.   Clear editor

×   You cannot paste images directly. Upload or insert images from URL.

×
×
  • Create New...