Re: SQL-GAteway for WWW
Posted in 1995
Topics: Server Administration
In article <3fe257$46a@sun24.tfh-berlin.de>, menzel@iri05.tfh-berlin.de (Olaf Menzel) writes:
]Hello everybody,
]Does anybody of you know how to write a SQL-WWW-GAteway for Informix?
]
]I have tried to use the CGI, but I have not had success.
]
]here is the contents of the cgi-script:
]
]PATH="/disk4/usr1/rz/harmlos/www/:$PATH"
]export PATH
]
]# Header:
]cgiutils -expires now -ct text/html
]
]#Body:
]echo "<HTML>"
]echo "<HEAD>"
]title="DATENBANKTEST"
]echo "<TITLE>${title}</TITLE>"
]echo "</HEAD>"
]echo "<BODY>"
]
]
]echo "<H1> Test einer Informix <---> WWW- Schnittstelle </H1>"
]
]echo "<br>"
]echo "<pre>"
]dbaccess harmlos probe.sql
]echo "</pre>"
]echo "<br></BODY>"
]echo "</HTML>"
[stuff deleted]
]
]Can anybody of you help me ?
]
]Thank you,
]
]Olaf
]--
If this is a full listing of your script, you definitely have environment
problems. The reason it can't find the script is quite likely that the
current working directory for the script when it is run by your httpd is
different to when you are testing it. Try supplying the full path. As
mentioned by other posters, you don't really need the .sql extension.
You will probably need your path set up (although it seems to be OK, or
else you wouldn't be able to execute dbaccess in the first place!),
TBCONFIG and SQLEXEC should be set etc.
Otherwise, this should work OK.
- Ben Kelley.
--
Ben Kelley=ben@syd.au.swissbank.com \\|/ "And the cat came back,|8888......
Swiss Bank Corporation, Australia )-O-( it wouldn't stay away.|8888.o..o.
Ph +61 (0)2 258 2382, Fax 258 2400 /|\\ The cat came back, |8888......
| ___the very next day."___|8888......
Write OK (in red) to continue. [] | |OOOOOOOOOOOOOOOOOOOOOOOOOO8888.\\__/.
~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~O=O-[~~~~~|OOOOOOOOOOOOOOOOOOOOOOOOOO8888......