cgi
Pavel Cech
cech na breclav.czech.net
Pondělí Duben 12 21:57:16 CEST 1999
Hi,
Nejak se nedari pustit cgi-skript:
v error_logu to pise:
>access to /home/httpd/cgi-bin/finger.cgi failed for 192.168.1.1 >reason:
malformed header from script. Bad header=HTTP/1.0 200 OK
Mam Apache 1.2.6-4
v IE dostanu hlasku:
>500 Internal Server Error
>The server encountered an internal error or misconfiguration and >was
unable to complete your request.
v cgi skriptu je:
#!/bin/sh
FINGER=/usr/bin/finger
SCRIPTURL=/home/httpd/cgi-bin/finger.cgi
BACKGROUNDCOLOR=ffffff
echo HTTP/1.0 200 OK
echo Content-type: text/html
echo Server: $SERVER_SOFTWARE
echo
cat << EOM
<HTML><HEAD><TITLE>Prihlaseni uzivatele</TITLE>
<link rev="made" href="mailto:webmaster na smokey.net">
</HEAD><BODY BGCOLOR="#$BACKGROUNDCOLOR">
<H1>Finger</H1>
EOM
if [ -x $FINGER ]; then
if [ $# = 0 ]; then
cat << EOM
Type in the user na host or @host to finger.
<ISINDEX>
EOM
else
echo "Prihlaseni uzivatele na zarizeni <b>$1</b>:"
echo \<PRE\>
nice $FINGER "$1" 2>&1
echo \</PRE\>
fi
else
echo Cannot find finger on this system.
fi
cat << EOM
<br>
</BODY></HTML>
Cim to muze bejt?
Další informace o konferenci Linux