P.Z. Low Cost CPanel Web Hosting  

Go Back   P.Z. Low Cost CPanel Web Hosting > Page-Zone Web Hosting Main Forum > General Discussion

General Discussion Anything which doesn't fit into the specific topics above. Posting limited to registered members.

Reply
 
LinkBack Thread Tools Rating: Thread Rating: 456 votes, 4.99 average. Display Modes
Can't Get Guestbook CGI Script to Work
Old
  (#1 (permalink))
Gavin
Registered User
Gavin is on a distinguished road
 
Status: Offline
Posts: 10
Join Date: Apr 2003
Rep Power: 35
Can't Get Guestbook CGI Script to Work - 12-04-2006, 11:33 PM

I'm trying to use the script guestbook.pl, which I've placed in the CGI bin and am calling from the form at http://www.b-iris.com/tlupl21o_guestbook.html.

When I hit "submit," I get the following error page:

> Internal Server Error
>
> The server encountered an internal error or misconfiguration and was
> unable to complete your request. Please contact the server administrator,
> webmaster@b-iris.com and inform them of the time the error occurred, and
> anything you might have done that may have caused the error.
>
> More information about this error may be available in the server error
> log.
>
> Additionally, a 404 Not Found error was encountered while trying to use an
> ErrorDocument to handle the request.

Permissions are supposed to be "a+rx" - I'm not sure what that works out to numerically, so I've set them to 777.

I also think that I may have erred in the following section of the script, since I'm not sure what $guestbookreal, $guestlog, and $date_command should be.

$guestbookurl = "http://www.b-iris.com/guestbook.html";
$guestbookreal = "/usr/www/users/iris/guestbook.html";
$guestlog = "/usr/www/users/iris/guestlog.html";
$cgiurl = "http://www.b-iris.com/cgi-bin/guestbook.pl";
$date_command = "/usr/bin/date";

Thanks,

Andrew
   
Reply With Quote
Old
  (#2 (permalink))
midwest
blink and it's over
midwest will become famous soon enough
 
midwest's Avatar
 
Status: Offline
Posts: 802
Join Date: Oct 2002
Location: Big Sky, MT
Rep Power: 78
12-05-2006, 12:44 AM

a+rx==755

a 500 is a general error, put this as your first line after the shebang(!#/usr/bin/perl)

use CGI::Carp qw(fatalsToBrowser);

It will sometimes give you a better idea of what the problem is. Have you checked your error log?

$guestbookreal = "/usr/www/users/iris/guestbook.html"; --- this should be the path. Probably something like /home/username/public_html/guestbook.html

.


Ronnie Gauthier
www.instaguide.com

======================
for official page-zone support please visit
www.page-zone.com/support.shtml
   
Reply With Quote
Old
  (#3 (permalink))
BobtheWebMan2
Registered User
BobtheWebMan2 has a little shameless behaviour in the past
 
Status: Offline
Posts: 53
Join Date: Nov 2006
Rep Power: 0
12-05-2006, 01:48 PM

Also, since you have the actual script, try hacking through it a bit, cutting out various pieces until you find the line that is triggering the fault. Once you get it down to a specific line you will have a better chance of figuring out if it's you or a general Perl / System Interface problem.
   
Reply With Quote
Old
  (#4 (permalink))
midwest
blink and it's over
midwest will become famous soon enough
 
midwest's Avatar
 
Status: Offline
Posts: 802
Join Date: Oct 2002
Location: Big Sky, MT
Rep Power: 78
12-05-2006, 02:06 PM

One thing I forgot to mention. Line endings are one of the most common causes of 500 errors. Get a text editor that can change between DOS and Unix line endings.
http://www.lancs.ac.uk/staff/steveb/...e/pfefiles.htm
The above, PFE,(Programmers File Editor) is a great editor. At the bottom when you open a file you will see some boxes. One will have either DOS or Unix in it. If the file has DOS endings it will never run under Perl. If this is the case then just double click the DOS and it will change to Unix type endings. Just save the file and upload it again.

.


Ronnie Gauthier
www.instaguide.com

======================
for official page-zone support please visit
www.page-zone.com/support.shtml
   
Reply With Quote
Old
  (#5 (permalink))
Gavin
Registered User
Gavin is on a distinguished road
 
Status: Offline
Posts: 10
Join Date: Apr 2003
Rep Power: 35
12-06-2006, 12:34 AM

$guestbookreal = "/home/iris/public_html/guestbook.html";
did the trick. Thanks!

Andrew
   
Reply With Quote
Reply



Currently Active Users Viewing This Thread: 1 (0 members and 1 guests)
 
Thread Tools
Display Modes Rate This Thread
Rate This Thread:

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is Off
HTML code is Off
Trackbacks are On
Pingbacks are On
Refbacks are On

Similar Threads
Thread Thread Starter Forum Replies Last Post
Advanced Guestbook Jim Misc free php scripts 0 07-22-2007 12:57 PM
Advanced Guestbook Installation Fails RC Racer General Chat 6 12-21-2004 03:11 AM
How can I see if a cgi script is the fault of my script or the fault of the server? Jim General Questions and Comments 0 11-11-2004 10:23 PM
advanced guestbook templates faith General Questions and Comments 4 08-06-2003 01:18 AM
Advanced Guestbook antipsyk General Questions and Comments 1 12-25-2002 04:52 PM


Live Help



Powered by vBulletin® Version 3.7.0
Copyright ©2000 - 2009, Jelsoft Enterprises Ltd.
Search Engine Optimization by vBSEO 3.0.0 RC6
vBulletin Skin developed by: vBStyles.com
Copyright © 2002 Page-Zone Web Hosting. All rights reserved.
Smilies provided by Crack's Smilies http://www.mysmilies.com