P.Z. Low Cost CPanel Web Hosting  

Go Back   P.Z. Low Cost CPanel Web Hosting > Page-Zone Web Hosting Main Forum > General FAQ > General Questions and Comments

General Questions and Comments Post your question or grace us with your knowledge. Posting limited to registered members.

Reply
 
LinkBack Thread Tools Rate Thread Display Modes
CGI Scripts
Old
  (#1 (permalink))
technicare
Registered User
technicare is on a distinguished road
 
Status: Offline
Posts: 10
Join Date: Mar 2003
Location: Norristown, PA
Rep Power: 35
CGI Scripts - 03-31-2003, 02:38 PM

I am new to CGI programming - so please be patient. I have uploaded a test.cgi script to my cgi-bin and set the necessary permissions (7-5-5). When I call the script, I get the message,

Internal Server Error
The server encountered an internal error or misconfiguration and was unable to complete your request.
Please contact the server administrator, webmaster@technicareservices.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.

Can someone tell me what I may be doing wrong?
   
Reply With Quote
some things to check:
Old
  (#2 (permalink))
stratplan
Registered User
stratplan will become famous soon enough
 
stratplan's Avatar
 
Status: Offline
Posts: 706
Join Date: Sep 2002
Location: Texas, USA
Rep Power: 73
Lightbulb some things to check: - 03-31-2003, 03:10 PM

The most common reasons CGI scripts don't work the first time are:

1) wrong header info - first line.
2) not uploaded in ascii format
3) incorrect call to run program
and
4)wrong permissions

Big Nose Bird

This is a great place for scripts and especially a tutorial for CGI.

Good luck - keep trying, and check every little thing. You've done well with the permissions!


stratplan
Click Here to Visit Page-Zone's Help Desk
Help find disease cures: FoldForCures
   
Reply With Quote
Old
  (#3 (permalink))
technicare
Registered User
technicare is on a distinguished road
 
Status: Offline
Posts: 10
Join Date: Mar 2003
Location: Norristown, PA
Rep Power: 35
03-31-2003, 03:49 PM

Thanks Strat - I simplified my script and I believe that I had some erroneous HTML code.

Side note: I noticed through many of the posts here that some users post web pages to /www/... and others post to /public_html/... Are these two directories actually mirrors of one another? It seems that if you make changes in one directory, this change occurs in the other (such as uploading files, etc... ) Does it matter which one you publish web pages to, upload CGI scripts, etc... Looking for a sanity check.
   
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: 77
05-21-2003, 04:42 PM

In cpanel you have an error log, use it. you can also run your script from the command line. SSH into your server and cd to where the sript is. "perl myscript.cgi" will return output. Use a trap sub routine as you move along your script to check outputs.
use -w scitch(perl -w myscript.cgi from the command line) this will help catch typos which can drive you nutz in perl.
oh yea, dont name a script "test"
$thistoo = blah,blah;
$whatisthis = blah,blah;

&trap_errors($whatisthis, error is:$!, $thistoo);

sub trap_errors()
{
local($status,$error,$message)=@_;
print "Content-type: text/html" , "\n\n";
print "<html><body>";
print "Status<p>";
print "$error<br>";
print "$message";
print "</body></html>";
}


Ronnie Gauthier
www.instaguide.com

======================
for official page-zone support please visit
www.page-zone.com/support.shtml
   
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
Backup Scripts SailFan General Questions and Comments 1 08-15-2005 07:16 PM
Will cgi scripts run out of any directory? Jim General Questions and Comments 0 11-11-2004 10:05 PM
Where to place php scripts? etman General Questions and Comments 1 04-15-2003 09:22 AM
Install and Uninstall CGI Scripts alex298 General Questions and Comments 2 02-09-2003 05:30 AM
scripts: CGI-BIN or any directory? dykhouse General Questions and Comments 2 01-24-2003 03:55 PM


Live Help



Powered by vBulletin® Version 3.7.0
Copyright ©2000 - 2008, 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