perl script for guestbook, need help

shifeng

New Member
Messages
13
Reaction score
0
Points
0
Hi, I need some help with the perl script I've installed to run a guestbook.

I've checked and everything on the script is fine. I've followed the instructions of the setup but i still get an error when i click the send button. It will come up with a 404 error. Please help.

my URL is http://shifeng.exofire.net

Thanks lots.
 

Corey

I Break Things
Staff member
Messages
34,551
Reaction score
204
Points
63
Moved to site management.
 

Derek

Community Support Force
Community Support
Messages
12,882
Reaction score
186
Points
63
Do you have a link to it?
 

DefecTalisman

Community Advocate
Community Support
Messages
4,148
Reaction score
5
Points
38
looks fine.
Is the path to perl right?
Is permissions set to 755?
Is there any undefined vars in your script?
Maybe the script requiers a module not installed on the server?
check ciroc's perl modules:
http://www.defectalisman.exofire.net/cgi-bin/tools/check_mod.pl

The only other thing I can think of is something directly wrong in the script, such as wrong syntax or a "or die stament that is doing exactly that".

I got around this by creating a sub for the script to die.
eg:
Code:
#!usr/bin/perl

sub error;

print $var or &error(01, "error message here");

sub error {
 my ($no, $msg) = @_;
 print "This script has a error number $no.\n The message for the error is this: $msg\n";
}

Worked for me. Put it next to everything that is suspect and it will tell you where it is having problems.
 

shifeng

New Member
Messages
13
Reaction score
0
Points
0
i have no experience with scripting really. I don't know anything about scripting. could you help me? maybe i could email u the file?
 

DefecTalisman

Community Advocate
Community Support
Messages
4,148
Reaction score
5
Points
38
By all means I can help you, not via e-mail though.

How many files is it and how many lines of code are there?

If its small enough put it inside a code tag.
eg:
[noparse]
Code:
The script here.
[/noparse]

else change the extension to *.txt and upload it to your account and then link me to it.
 
Last edited:

DefecTalisman

Community Advocate
Community Support
Messages
4,148
Reaction score
5
Points
38
uhm... I dont want to download it.

Its 12.5kb. That cant be more than 100 lines code or so.

Copy and paste all the text from the script into a text file and upload it to your public_html and then give me a link to it.
eg:
[noparse]http://www.defectalisman.exofire.net/examples/test.[/noparse]txt
 
Last edited:

DefecTalisman

Community Advocate
Community Support
Messages
4,148
Reaction score
5
Points
38
Ok, on first inspection all looks fine.

put in use strict;
and we get:

Code:
>perl -cw tmp.pl
Global symbol "$guestbookurl" requires explicit package name at tmp.pl line 27.
Global symbol "$guestbookreal" requires explicit package name at tmp.pl line 28.
Global symbol "$guestlog" requires explicit package name at tmp.pl line 29.
Global symbol "$cgiurl" requires explicit package name at tmp.pl line 30.
Global symbol "$date_command" requires explicit package name at tmp.pl line 31.
Global symbol "$mail" requires explicit package name at tmp.pl line 34.
Global symbol "$uselog" requires explicit package name at tmp.pl line 35.
Global symbol "$linkmail" requires explicit package name at tmp.pl line 36.
Global symbol "$separator" requires explicit package name at tmp.pl line 37.
Global symbol "$redirection" requires explicit package name at tmp.pl line 38.
Global symbol "$entry_order" requires explicit package name at tmp.pl line 39.
Global symbol "$remote_mail" requires explicit package name at tmp.pl line 41.
Global symbol "$allow_html" requires explicit package name at tmp.pl line 42.
Global symbol "$line_breaks" requires explicit package name at tmp.pl line 43.
Global symbol "$mailprog" requires explicit package name at tmp.pl line 47.
Global symbol "$recipient" requires explicit package name at tmp.pl line 48.
Global symbol "$date" requires explicit package name at tmp.pl line 54.
Global symbol "$date_command" requires explicit package name at tmp.pl line 54.
Global symbol "$date" requires explicit package name at tmp.pl line 54.
Global symbol "$shortdate" requires explicit package name at tmp.pl line 55.
Global symbol "$date_command" requires explicit package name at tmp.pl line 55.
Global symbol "$shortdate" requires explicit package name at tmp.pl line 55.
Global symbol "$buffer" requires explicit package name at tmp.pl line 58.
Global symbol "@pairs" requires explicit package name at tmp.pl line 61.
Global symbol "$buffer" requires explicit package name at tmp.pl line 61.
Global symbol "$pair" requires explicit package name at tmp.pl line 63.
Global symbol "@pairs" requires explicit package name at tmp.pl line 63.
Global symbol "$name" requires explicit package name at tmp.pl line 64.
Global symbol "$value" requires explicit package name at tmp.pl line 64.
Global symbol "$pair" requires explicit package name at tmp.pl line 64.
Global symbol "$value" requires explicit package name at tmp.pl line 67.
Global symbol "$value" requires explicit package name at tmp.pl line 68.
Global symbol "$value" requires explicit package name at tmp.pl line 69.
Global symbol "$allow_html" requires explicit package name at tmp.pl line 71.
Global symbol "$value" requires explicit package name at tmp.pl line 72.
Global symbol "%FORM" requires explicit package name at tmp.pl line 75.
Global symbol "$name" requires explicit package name at tmp.pl line 75.
Global symbol "$value" requires explicit package name at tmp.pl line 75.
Global symbol "%FORM" requires explicit package name at tmp.pl line 79.
Global symbol "%FORM" requires explicit package name at tmp.pl line 80.
Global symbol "$guestbookreal" requires explicit package name at tmp.pl line 83.
Global symbol "$guestbookreal" requires explicit package name at tmp.pl line 83.
Global symbol "@LINES" requires explicit package name at tmp.pl line 84.
Global symbol "$SIZE" requires explicit package name at tmp.pl line 86.
Global symbol "@LINES" requires explicit package name at tmp.pl line 86.
Global symbol "$guestbookreal" requires explicit package name at tmp.pl line 89.
Global symbol "$guestbookreal" requires explicit package name at tmp.pl line 89.
Global symbol "$i" requires explicit package name at tmp.pl line 91.
Global symbol "$i" requires explicit package name at tmp.pl line 91.
Global symbol "$SIZE" requires explicit package name at tmp.pl line 91.
Global symbol "$i" requires explicit package name at tmp.pl line 91.
Global symbol "@LINES" requires explicit package name at tmp.pl line 92.
Global symbol "$i" requires explicit package name at tmp.pl line 92.
Global symbol "$entry_order" requires explicit package name at tmp.pl line 95.
Global symbol "$line_breaks" requires explicit package name at tmp.pl line 99.
Global symbol "%FORM" requires explicit package name at tmp.pl line 100.
Global symbol "%FORM" requires explicit package name at tmp.pl line 103.
Global symbol "%FORM" requires explicit package name at tmp.pl line 105.
Global symbol "%FORM" requires explicit package name at tmp.pl line 106.
Global symbol "%FORM" requires explicit package name at tmp.pl line 106.
Global symbol "%FORM" requires explicit package name at tmp.pl line 109.
Global symbol "%FORM" requires explicit package name at tmp.pl line 112.
Global symbol "$linkmail" requires explicit package name at tmp.pl line 113.
Global symbol "%FORM" requires explicit package name at tmp.pl line 114.
Global symbol "%FORM" requires explicit package name at tmp.pl line 115.
Global symbol "%FORM" requires explicit package name at tmp.pl line 118.
Global symbol "%FORM" requires explicit package name at tmp.pl line 124.
Global symbol "%FORM" requires explicit package name at tmp.pl line 125.
Global symbol "%FORM" requires explicit package name at tmp.pl line 128.
Global symbol "%FORM" requires explicit package name at tmp.pl line 129.
Global symbol "%FORM" requires explicit package name at tmp.pl line 132.
Global symbol "%FORM" requires explicit package name at tmp.pl line 133.
Global symbol "$separator" requires explicit package name at tmp.pl line 136.
Global symbol "$date" requires explicit package name at tmp.pl line 137.
Global symbol "$date" requires explicit package name at tmp.pl line 140.
Global symbol "$entry_order" requires explicit package name at tmp.pl line 143.
Global symbol "$uselog" requires explicit package name at tmp.pl line 157.
Global symbol "$mail" requires explicit package name at tmp.pl line 166.
Global symbol "$mailprog" requires explicit package name at tmp.pl line 167.
Global symbol "$recipient" requires explicit package name at tmp.pl line 167.
Global symbol "$mailprog" requires explicit package name at tmp.pl line 167.
Global symbol "%FORM" requires explicit package name at tmp.pl line 169.
Global symbol "%FORM" requires explicit package name at tmp.pl line 169.
Global symbol "%FORM" requires explicit package name at tmp.pl line 170.
Global symbol "%FORM" requires explicit package name at tmp.pl line 170.
Global symbol "%FORM" requires explicit package name at tmp.pl line 174.
Global symbol "%FORM" requires explicit package name at tmp.pl line 175.
Global symbol "%FORM" requires explicit package name at tmp.pl line 177.
Global symbol "%FORM" requires explicit package name at tmp.pl line 178.
Global symbol "%FORM" requires explicit package name at tmp.pl line 183.
Global symbol "%FORM" requires explicit package name at tmp.pl line 184.
Global symbol "%FORM" requires explicit package name at tmp.pl line 187.
Global symbol "%FORM" requires explicit package name at tmp.pl line 188.
Global symbol "%FORM" requires explicit package name at tmp.pl line 191.
Global symbol "%FORM" requires explicit package name at tmp.pl line 192.
Global symbol "$date" requires explicit package name at tmp.pl line 195.
 

DefecTalisman

Community Advocate
Community Support
Messages
4,148
Reaction score
5
Points
38
Code:
Global symbol "$remote_mail" requires explicit package name at tmp.pl line 201.
Global symbol "%FORM" requires explicit package name at tmp.pl line 201.
Global symbol "$mailprog" requires explicit package name at tmp.pl line 202.
Global symbol "$mailprog" requires explicit package name at tmp.pl line 202.
Global symbol "%FORM" requires explicit package name at tmp.pl line 204.
Global symbol "$recipient" requires explicit package name at tmp.pl line 205.
Global symbol "%FORM" requires explicit package name at tmp.pl line 209.
Global symbol "%FORM" requires explicit package name at tmp.pl line 210.
Global symbol "%FORM" requires explicit package name at tmp.pl line 212.
Global symbol "%FORM" requires explicit package name at tmp.pl line 213.
Global symbol "%FORM" requires explicit package name at tmp.pl line 218.
Global symbol "%FORM" requires explicit package name at tmp.pl line 219.
Global symbol "%FORM" requires explicit package name at tmp.pl line 222.
Global symbol "%FORM" requires explicit package name at tmp.pl line 223.
Global symbol "%FORM" requires explicit package name at tmp.pl line 226.
Global symbol "%FORM" requires explicit package name at tmp.pl line 227.
Global symbol "$date" requires explicit package name at tmp.pl line 230.
Global symbol "$redirection" requires explicit package name at tmp.pl line 237.
Global symbol "$guestbookurl" requires explicit package name at tmp.pl line 238.
Global symbol "$cgiurl" requires explicit package name at tmp.pl line 254.
Global symbol "%FORM" requires explicit package name at tmp.pl line 256.
Global symbol "%FORM" requires explicit package name at tmp.pl line 258.
Global symbol "%FORM" requires explicit package name at tmp.pl line 259.
Global symbol "%FORM" requires explicit package name at tmp.pl line 261.
Global symbol "%FORM" requires explicit package name at tmp.pl line 262.
Global symbol "$guestbookurl" requires explicit package name at tmp.pl line 266.
Global symbol "$uselog" requires explicit package name at tmp.pl line 270.
Global symbol "$cgiurl" requires explicit package name at tmp.pl line 284.
Global symbol "%FORM" requires explicit package name at tmp.pl line 287.
Global symbol "%FORM" requires explicit package name at tmp.pl line 288.
Global symbol "%FORM" requires explicit package name at tmp.pl line 290.
Global symbol "%FORM" requires explicit package name at tmp.pl line 291.
Global symbol "%FORM" requires explicit package name at tmp.pl line 295.
Global symbol "$guestbookurl" requires explicit package name at tmp.pl line 297.
Global symbol "$uselog" requires explicit package name at tmp.pl line 301.
Global symbol "$log_type" requires explicit package name at tmp.pl line 310.
Global symbol "$guestlog" requires explicit package name at tmp.pl line 311.
Global symbol "$log_type" requires explicit package name at tmp.pl line 312.
Global symbol "$shortdate" requires explicit package name at tmp.pl line 313.
Global symbol "$log_type" requires explicit package name at tmp.pl line 315.
Global symbol "$shortdate" requires explicit package name at tmp.pl line 316.
Global symbol "$log_type" requires explicit package name at tmp.pl line 318.
Global symbol "$shortdate" requires explicit package name at tmp.pl line 319.
Global symbol "%FORM" requires explicit package name at tmp.pl line 336.
Global symbol "%FORM" requires explicit package name at tmp.pl line 338.
Global symbol "%FORM" requires explicit package name at tmp.pl line 339.
Global symbol "%FORM" requires explicit package name at tmp.pl line 339.
Global symbol "%FORM" requires explicit package name at tmp.pl line 342.
Global symbol "%FORM" requires explicit package name at tmp.pl line 345.
Global symbol "$linkmail" requires explicit package name at tmp.pl line 346.
Global symbol "%FORM" requires explicit package name at tmp.pl line 347.
Global symbol "%FORM" requires explicit package name at tmp.pl line 348.
Global symbol "%FORM" requires explicit package name at tmp.pl line 351.
Global symbol "%FORM" requires explicit package name at tmp.pl line 357.
Global symbol "%FORM" requires explicit package name at tmp.pl line 358.
Global symbol "%FORM" requires explicit package name at tmp.pl line 361.
Global symbol "%FORM" requires explicit package name at tmp.pl line 362.
Global symbol "%FORM" requires explicit package name at tmp.pl line 365.
Global symbol "%FORM" requires explicit package name at tmp.pl line 366.
Global symbol "$date" requires explicit package name at tmp.pl line 369.
Global symbol "$guestbookurl" requires explicit package name at tmp.pl line 373.
*.pl had compilation errors.
>Exit code: 255

Almost all variables are undefined.

This could be the prob. That is alot to mod. Maybe you are better served finding something that wasn't written 11 years ago.

There are much better options under your cPanel. Look for programs or software and then install from there.
 

DefecTalisman

Community Advocate
Community Support
Messages
4,148
Reaction score
5
Points
38
Sorry, I tried.

Could go through it and define all the globals for you but not now.
Curently at work with a busy lunch.
 

max1x

New Member
Messages
27
Reaction score
0
Points
0
Can't see the script.

Use the -w switch to generate errors, which has been replaced with warning pragma i.e add the following under the path

use warnings;

. Go to cPanel and check under errorlog once errors are generated.
Edit:
hmm...just saw the errors listed above, it seems the script is using "strict" pragma and not declaring the variables as my.

if you comment out "use strict" from your script (not recommended), then test and post that add my to every variable when it's declared.
 
Last edited:
Top