[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

RE: [cobalt-users] Help with simple CGI.



All cgi errors are suppose to be logged in your error log,
located in /home/log/httpd/error.  Telnet in and do a "tail
-10 error" to see the last 20 entires in the error log.
Check there for a little more detail about what kind of
error you're receiving instead of the generic server
response for all "Internal Server Errors".  Or you can type
the following in telnet too:  perl -c yourfilename.cgi

Due to CGIWrap which comes installed on the RaQ3, debugging
scripts is a major pain in the butt.  I personally hate that
wrapper and am about ready to send it's suitcase a packing.

I believe Apache requires the .shtml file extension in order
to parse the file.  Details on SSI can be found at
www.apache.org or www.apacheweek.com

Liz

------Original Message------
From: "Michael Aronoff" <ma@xxxxxxxx>
To: cobalt-users@xxxxxxxxxxxxxxx
Sent: January 27, 2000 1:01:40 AM GMT
Subject: [cobalt-users] Help with simple CGI.


I am trying to use a simple counter CGI on my raq3 but when
I run it I get
an error that comes up in place of the result in the screen:
The server
encountered an internal error or misconfiguration and was
unable to complete
your request.

It is a very simple server side include (<!--#exec
cgi="counter2.cgi"-->)
and I have it running on other web hosts.  But I am moving
gall my sites to
a Raq3 and CGI is giving me fits. Oh and is it possible to
make server side
includes run just from an .html page rather than having to
specify .shtml
which is a pain if you want to do the SSI on you homepage.

Thanks in advance.

Michael Aronoff - CIIC
ma@xxxxxxxx
Calabasas, CA

Here is the CGI:

#!/usr/bin/perl --'
##########################
# counter 1.0
#
# By Command-O Software
# http://www.command-o.com
#
# Copyright 1996.
# All Rights Reserved
#
#If you find this script useful, we would appreciate a
#donation to keep this service active for the community.
#Command-O Software, P.O. Box 12200, Jackson WY 83002
##########################
#<!--#exec cgi="counter2.cgi"-->
$file = "$ENV{'DOCUMENT_URI'}";
$file =~ s/\//_/g;
open(FILE,"data/$file");
flock (FILE, 2);
$count = <FILE>;
flock (FILE, 8);
close(FILE);

$count++;

open(FILE,">data/$file");
flock (FILE, 2);
print FILE "$count";
flock (FILE, 8);
close(FILE);
print "Content-type: text/html\n\n";
print "$count";
exit;


_______________________________________________
cobalt-users mailing list
cobalt-users@xxxxxxxxxxxxxxx
http://list.cobalt.com/mailman/listinfo/cobalt-users

______________________________________________
FREE Personalized Email at Mail.com
Sign up at http://www.mail.com?sr=mc.mk.mcm.tag001