Thread: CGI Scripts
View Single Post
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
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