TOP
SSV SOFTWARE SYSTEMS REGISTER  REGISTER
Log in to check your private messages  Log in to check your private messages
START FAQ SEARCH MITGLIEDER PROFILE  Log in 
SSV-Forum
CGI und der DNP/9200 Webserver ...

 
Post new topic   Reply to topic    SSV-Forum Forum Index >>> DNP/9200
<<< Previous topic - Next topic >>>  
Display posts from previous:   
Author Message
kdw



Joined: 05 May 2006
Posts: 1519

PostPosted: 25.01.2007, 09:03    Post subject: CGI und der DNP/9200 Webserver ... Reply with quote

Der thttpd Webserver (Bestandteil der Linux-Konfiguration eines DNP/9200) ist für CGI vorbereitet. Um CGI zu testen, einfach das folgende Shell Script im Verzeichnis /flash/www/cgi-bin als Datei mit dem Namen „test.sh“ ablegen (falls /flash/www/cgi-bin nicht vorhanden ist, bitte dieses Verzeichnis zunächst erzeugen):

#!/bin/sh
# test.sh
# Environment Variable
echo Content-type: text/html
echo
echo "<html>"
echo "<head>"
echo "<title>"
echo "CGI Environment Variable"
echo "</title>"
echo "</head>"
echo "<body>"
echo "SERVER_SOFTWARE=$SERVER_SOFTWARE<br/>"
echo "SERVER_NAME=$SERVER_NAME<br/>"
echo "SERVER_PROTOCOL=$SERVER_PROTOCOL<br/>"
echo "SERVER_PORT=$SERVER_PORT<br/>"
echo "REQUEST_METHOD=$REQUEST_METHOD<br/>"
echo "GATEWAY_INTERFACE=$GATEWAY_INTERFACE<br/>"
echo "PATH_INFO=$PATH_INFO<br/>"
echo "PATH_TRANSLATED=$PATH_TRANSLATED<br/>"
echo "REMOTE_HOST=$REMOTE_HOST<br/>"
echo "REMOTE_ADDR=$REMOTE_ADDR<br/>"
echo "REMOTE_IDENT=$REMOTE_IDENT<br/>"
echo "SCRIPT_NAME=$SCRIPT_NAME<br/>"
echo "QUERY_STRING=$QUERY_STRING<br/>"
echo "CONTENT_TYPE=$CONTENT_TYPE<br/>"
echo "CONTENT_LENGTH=$CONTENT_LENGTH<br/>"
echo "</body>"
echo "</html>"
exit 0


Die Datei mit dem Script Code muss mit “Read = +r” und “Executable = +x” Attributen ausgestattet werden. Danach kann sie per Webbrowser über die entsprechende URL ausgeführt werden. Die URL wäre

http://192.168.0.126/cgi-bin/test.sh

Dabei ist 192.168.0.126 die IP-Adresse des DNP/9200.

Gruß

KDW
Back to top
View user's profile Send private message
kdw



Joined: 05 May 2006
Posts: 1519

PostPosted: 26.01.2007, 08:47    Post subject: CGI ... Reply with quote

Mit http://www.dilnetpc.com/mHT9200-33.pdf steht jetzt auch eine Beschreibung der einzelnen Schritte zur Verfügung.

Gruß

KDW
Back to top
View user's profile Send private message
Display posts from previous:   
Post new topic   Reply to topic    SSV-Forum Forum Index >>> DNP/9200 All times are GMT + 1 Hour
Page 1 of 1

 
Jump to:  
You cannot post new topics in this forum
You cannot reply to topics in this forum
You cannot edit your posts in this forum
You cannot delete your posts in this forum
You cannot vote in polls in this forum

SSV SOFTWARE SYSTEMS

Dünenweg 5
30419 Hannover

Fon: +49(0)511  ·  40 000-0
Fax: +49(0)511  ·  40 000-40

sales@ssv-embedded.de


Impressum    ·    Datenschutz    ·    AGB

© 2024 SSV SOFTWARE SYSTEMS GmbH. Alle Rechte vorbehalten.

ISO 9001:2015