#45326 - 2003-09-05 06:04 PM
Re: kix and html
|
Anonymous
Anonymous
Unregistered
|
doesn't work either
|
|
Top
|
|
|
|
#45328 - 2003-09-05 06:38 PM
Re: kix and html
|
Howard Bullock
KiX Supporter
   
Registered: 2000-09-15
Posts: 5809
Loc: Harrisburg, PA USA
|
Based on what I have seen here. I thought that when using the "?" in a URL that you needed some ASP program to get the parms and do something with them.
|
|
Top
|
|
|
|
#45329 - 2003-09-05 06:44 PM
Re: kix and html
|
Howard Bullock
KiX Supporter
   
Registered: 2000-09-15
Posts: 5809
Loc: Harrisburg, PA USA
|
How badly do you need this? I could build you an HTTP daemon in Perl that could be installed and run as a service.
You could reference the URL and the service could issue a system call to invoke what ever script and parms you want. I would parse the URI and build the script command line then invoke it.
This solution would execute on the workstation or server where the service is running. Let me know. [ 05. September 2003, 19:11: Message edited by: Howard Bullock ]
|
|
Top
|
|
|
|
#45331 - 2003-09-08 10:41 AM
Re: kix and html
|
Richard H.
Administrator
   
Registered: 2000-01-24
Posts: 4946
Loc: Leatherhead, Surrey, UK
|
If you are running KiXtart as a CGI under IIS then the web server must conform to the CGI protocol, which include passing the parameters to the executing program via environment variables.
I have Apache installed on my machine with KiXtart configured as a CGI.
Here is the script:
$gNULL=SetOption("ASCII","ON") $gNULL=RedirectOutput(%TEMP%+"\"+%REMOTE_ADDR%+"_"+%REMOTE_PORT%+".txt",1) $sTempFile=%TEMP%+"\cmd_output.txt" "Content-Type: text/html" ? ? "<"+"HTML>" "<"+"HEAD>" "<TITLE>KiXtart as CGI demonstration</TITLE>" "</"+"HEAD>" "<"+"BODY>" "Using KiXtart version "+@KIX+" as CGI!<BR>" "<HR>" "The following environment variables are set:" Shell "%COMSPEC% /C SET >"+$sTempFile "<PRE>" Display $sTempFile "</PRE>" Del $sTempFile "<"+"/BODY>" "<"+"/HTML>" Exit 99
|
If I call the script with this URL:
quote: http://localhost:8080/kixdemo.kix?myparameter
I get the following: quote: Using KiXtart version 4.20 as CGI!
-------------------------------------------------------------------------------- PROMPT=$P$G REDIRECT_STATUS=200 HTTP_ACCEPT=image/gif, image/x-xbitmap, image/jpeg, image/pjpeg, application/vnd.ms-excel, application/vnd.ms-powerpoint, application/msword, application/x-shockwave-flash, */* HTTP_ACCEPT_LANGUAGE=en-gb HTTP_ACCEPT_ENCODING=gzip, deflate HTTP_USER_AGENT=Mozilla/4.0 (compatible; MSIE 6.0; Windows NT 5.1; .NET CLR 1.1.4322) HTTP_HOST=localhost:8080 HTTP_CONNECTION=Keep-Alive PATH=C:\Windows\system32;C:\Windows;C:\Windows\System32\Wbem;;C:\MinGW\bin;C:\Program Files\Compaq\Compaq Management Agents\Dmi\Win32\Bin;C:\Program Files\Symantec\pcAnywhere\ SystemRoot=C:\Windows COMSPEC=C:\Windows\system32\cmd.exe PATHEXT=.COM;.EXE;.BAT;.CMD;.VBS;.VBE;.JS;.JSE;.WSF;.WSH WINDIR=C:\Windows SERVER_SIGNATURE= Apache/2.0.47 (Win32) Server at localhost Port 8080
SERVER_SOFTWARE=Apache/2.0.47 (Win32) SERVER_NAME=localhost SERVER_ADDR=127.0.0.1 SERVER_PORT=8080 REMOTE_ADDR=127.0.0.1 DOCUMENT_ROOT=C:/Program Files/Apache Group/Apache2/htdocs SERVER_ADMIN=rhowarth@sgb.co.uk SCRIPT_FILENAME=C:/Program Files/Apache Group/Apache2/cgi-bin/exec_kix.bat REMOTE_PORT=1939 REDIRECT_QUERY_STRING=myparameter REDIRECT_URL=/kixdemo.kix GATEWAY_INTERFACE=CGI/1.1 SERVER_PROTOCOL=HTTP/1.1 REQUEST_METHOD=GET QUERY_STRING=myparameter REQUEST_URI=/kixdemo.kix?myparameter SCRIPT_NAME=/cgi-bin/exec_kix.bat PATH_INFO=/kixdemo.kix PATH_TRANSLATED=C:\Program Files\Apache Group\Apache2\htdocs\kixdemo.kix
Note the values of REQUEST_URI and QUERY_STRING. [ 08. September 2003, 11:03: Message edited by: Richard H. ]
|
|
Top
|
|
|
|
#45333 - 2003-09-08 11:05 AM
Re: kix and html
|
Richard H.
Administrator
   
Registered: 2000-01-24
Posts: 4946
Loc: Leatherhead, Surrey, UK
|
quote: and why you do this "<"+"something>" thing?
I don't use PostPrep, so it is a simple fix to avoid the "HEAD and BODY tags not allowed" error.
|
|
Top
|
|
|
|
Moderator: Jochen, Allen, Radimus, Glenn Barnas, ShaneEP, Ruud van Velsen, Arend_, Mart
|
1 registered
(Allen)
and 675 anonymous users online.
|
|
|