PDA

View Full Version : Perl....


Lem
07-02-2001, 06:21 PM
Hello, ITs ME again:rolleyes: :o and i'm haveing problems installing a perl script. (axs Logger) and I THINK I have it set up right but when I run both the regular script(ax.pl) AND the
admin-ax.pl(the admin part of it)I get an internal Error page. I have no clue whats wrong (Since I do not know perl) but mabye its a problem with my account(i've been unable to use some other perl scripts also)
ANY Help I could get WOuld Be GREAT!!!!! (if not then i'll just have to take this script off my site :mad: :( :confused:

if u wanna take a look at it the url is
http://chrem.com/cgi-bin/axslogger/axs/ax.pl
and
http://chrem.com/cgi-bin/axslogger/axs/ax-admin.pl
Thanks!!

Abyss Network
07-02-2001, 07:40 PM
Did you set the permissions? If you did, try 777... it may work!

Lem
07-02-2001, 07:43 PM
Yes I set the permissions ALL to 777(except the image files are 755) and it still didn't work:( :confused:

reuben
07-02-2001, 08:06 PM
If you log into your account, you can access the apache error logs through the tools menu, then stats, then error logs. That should give you a better idea of what is going wrong. Another common problem is that the scripts were uploaded in binary instead of ASCII.

Lem
07-03-2001, 04:48 AM
:( Hmm... I see well i'll get right on that, but I need to ask something... when u upload files through Cpanel does it do binary? (thats the way I uploaded those ifles) if it does i'll have to upload them with my ftp program I guess(I did it from a friends computer who didn't have an ftp program)

Lem
07-03-2001, 05:18 AM
;) :rolleyes: :) :D OK ITS ALL FIXED YEAH!

I'm not sure what was wrong I just downloaded the script again(its not mine wish I knew how to write like that :( ) then reinstalled everything edited the script a bit(to work for my website) then VULA!!! WORKS!!! (now I have REALLY good graphing statistics program for my website YES!!!!!!!)

LATERZ and thanks for the help guys...

reuben
07-03-2001, 11:14 AM
:)

dimx
07-03-2001, 11:51 AM
The thing I hate about Perl is that it doesnt tell you what exactly your errors are when you access your cgi page. PHP gives you an error message. Yeah, you can look into your log files to find errors, but that can take a while sometimes.

When writing and uploading code, always make sure the path to Perl is correct, then set the right permissions for everything that script will be using.

If your getting errors after that it's probably something inside the code, like not setting up any other correct variables. If you coded the program yourself, work from the top down looking for any possible error. Some common one's people leave out are

;
(
)
{
}

the ending " (quotation mark)



eg. print "Hello World; <-- no ending "

or if you want to print out a link:

print "&lt;a href="url"&gt;your link&lt;/a&gt;";

you have to escape the inside " 's with \


print "&lt;a href=\"url\"&gt;your link&lt;/a&gt;";

Just some words of advice!

blax
07-03-2001, 12:15 PM
If you want extra debugging information you must put in some command line options. try #!/usr/bin/perl -w. I think that will give you all the debuging information you need. Also check out the perlrun manpage.

blax
07-03-2001, 12:16 PM
Well you could redirect stderr to a file...

Lem
07-03-2001, 03:59 PM
What are you useing to do the access info (in cpanel)?

This software is GREAT! (although U DO have to put a bit of javascript or ssi code in your HTML)

U should check it out (I have my admin part set to public viewing but "public"s can't change settings)

The address is

http://www.chrem.com/cgi-bin/acslogger/axs/ax-admin.pl

laterz

Lem
07-03-2001, 04:00 PM
oops, the address is

http://www.chrem.com/cgi-bin/axslogger/axs/ax-admin.pl

:D