4GL/CGI and Environment Variables
Posted in 1996
Topics: Connectivity: ESQL/C, 4GL & Embedded SQL
Hi all.
I'm having the following problem getting the Informix
4glcgi package to work:
I think I'm getting everything compiled and connected okay. However,
my 4gl doesn't appear to be getting the environment variables
at all, using the "icgi_getvalue()" function. When I have it
print the environment variables that it has received in this
way, they are simply NULL.
For example:
--------------------------- wrapper.cgi ---------------------
#!/bin/sh
INFORMIXDIR=/usr/informix41;export INFORMIXDIRREQUEST_METHOD=GET;export REQUEST_METHOD
/usr4/www/apache/cgi-bin/fgl_test/cgi_runner [...no actual line break here]
/usr4/www/apache/cgi-bin/fgl_test/fgl_test
-------------------------------------------------------------
---------------------------fgl_test.4gl----------------------
GLOBALS
DEFINE g_request_method CHAR(12)
END GLOBALS
MAIN
IF ( icgi_start() != 0 ) THEN
CALL icgi_print_text("ERROR icgi_start<P>")
END IF
CALL icgi_mimetype("text/html")
LET g_request_method = icgi_getvalue("REQUEST_METHOD")
CALL icgi_print_text("requestmethod:")
CALL icgi_print_text(g_request_method)
CALL icgi_print_text(":Not there, eh?")
CALL icgi_free()
END MAIN
-------------------------------------------------------------
---------------------------Output----------------------------
Content-Type: text/html
requestmethod:
:Not there, eh?
-------------------------------------------------------------
I'm using Informix 4.1/SE. (Yes, it's a little old, but it
should certainly still work if it compiles, right?)
Does anyone have any ideas?
Thanks.
Nick
--
_ __ __
' ) ) / / )
/ / o _. /_ /--< __ _ _ ______ _
/ (_<_(__/ <_ /___/_/ (_</_</_/ / / <_/_)_
nchlsbrm@cc.dordt.edu