View Full Version : [CLOSED]CGIDEV2 programs
I have some CGIDEV2 programs running in the default HTTP instance (port 80) and want them to be part of the Valence Viewport.
It's possible to do this by config the option as 'Launch a Web Address' to the default HTTP instance, and it's working. It would be cleaner having these CGIDEV2 programs as part of the Valence HTTP instance instead of operating 2 HTTP instances.
Best way to do that ?
I am new to Valence and WEB 2.0 so rewriting these CGIDEV2 programs would take some time.
Brgds
Helge
richard.milone
03-07-2010, 05:18 PM
It might be possible to integrate the directives from your CGIDEV2 server instance with the VALENCE21 server instance so they operate from the same port. However, the most problematic difference could be that Valence operates in CGIConvMode BINARY. This means that the Valence framework itself handles the EBCDIC conversions and data passes through the Apache server unconverted. It's been a while since I've used CGIDEV2 so I don't know off the top of my head if it can be made to work in this mode. I would suggest you do a little experimenting to see if you can get it to work. Let us know what you find. There are probably others that would be curious about doing this.
I have copied the directives concerned a cgidev2 programs from the cgidev2 instance to the Valence21 instance.
Defined the options as
Launch a Web Address
http://xxx.org:11331/fuploadp/fupload2TW.cgi
Portal Tab
The http://... is same as for the working cgidev2 instance except the port (80)
Using this options results in HTTP server error 500 and errorlog shows
ZSRV_MSG0107: Premature end of script headers:
File name is fupload2TW.pgm, referer: http://xxx.org:11331/valence/vvvport.pgm
I use port 11331 instead of default Valence 7021.
With help from a friend (Richard) the problem is solved.
Reason was the CGIConvMode BINARY as a global setting for Valence.
Solution is setting CGIConvMode BINARY for Valence
and CGIConvMode EBCDIC for cgidev2 programs.
Following shows how to set a 'multi' CGIConvMode:
In the HTTP directives for Valence21 following is changed:
SetEnvIf "User-Agent" "MSIE 4\.0b2;" force-response-1.0
# CGIConvMode BINARY <------ commented with #
<Directory /QSYS.LIB/VALENCE21.LIB>
Order Allow,Deny
allow from all
CGIConvMode BINARY <------ added
</Directory>
In the directives for the cgidev2 programs added to Valence21:
<Directory /QSYS.LIB/FUPLOAD.LIB>
Options None
order allow,deny
allow from all
SetEnv QIBM_CGI_LIBRARY_LIST "QTEMP;QGPL;NYCPRD;TWREL;TWPRD"
CGIConvMode EBCDIC <------- added
</Directory>
richard.milone
03-12-2010, 02:33 PM
Glad we got it working...thanks for sharing the solution with the Valence community. I'm sure this will help others.
vBulletin® v3.7.1, Copyright ©2000-2012, Jelsoft Enterprises Ltd.