CGIs and Slinger

We are trying to run CGI applications from our HTMLs on a QNX 4 system. Our
CGI’s will not execute. We are starting slinger as follows:

export HTTPD_ROOT_DIR=/web/html
export HTTPD_ROOT_DOC=test.html
export HTTPD_SCRIPTALIAS=/web/cgi
slinger -s -e -d &

The link in our HTML looks as follows:
Test Link

When executing our HTML over a network using Explorer, Slinger finds our
root document immediately and displays the test.html. When trying to
execute the CGI link, Explorer will display ‘The page cannot be displayed’
(test.cgi is located in /web/cgi).

The type of error still makes me think that I am missing something in either
QNX’s cofiguration or in the setup of the calling HTML.

I have placed various prints in my CGI code and have verified that the CGI’s
are never started. ‘syslogd’ gives me an error for slinger of:

“Could not start CGI script /web/cgi/test.cgi: Operation not permitted”
“Error parsing CGI script HTTP header data. Sending raw data”

Which does verify that Slinger recognizes my CGI directory, however it will
not execute the commands. Currently all my test CGIs are ‘C’ binaries.

I have verified that Slinger’s environment variables include the definition
of HTTPD_SCRIPTALIAS, which is my understanding of how CGI processing is
enabled. Is there something else I need to do to enable CGI processing?
Does the calling HTML need to specify a particular version?




Any suggestions would be appreciated.

Thanks

“Tom Stave” <thstave@home.com> wrote in message
news:9srgud$hkn$1@inn.qnx.com

put attached archive file at your qnx4 root directory and unpack. it
contains the following files:

— cut —
drwxr-xr-x 0/0 0 Nov 14 05:58 2001 etc
-rwx------ 0/0 106 Nov 14 05:57 2001 etc/wwwstart
-rwx------ 0/0 45 Nov 14 05:57 2001 etc/wwwstop
drwxr-xr-x 0/0 0 Nov 14 05:56 2001 pub
drwxr-xr-x 0/0 0 Nov 14 05:56 2001 pub/www
drwxr-xr-x 0/0 0 Nov 14 05:58 2001 pub/www/doc
-rw-r–r-- 0/0 152 Nov 14 05:55 2001 pub/www/doc/index.html
drwxr-xr-x 0/0 0 Nov 14 05:58 2001 pub/www/cgi
-rwxr-xr-x 0/0 250 Nov 14 05:55 2001 pub/www/cgi/test.cgi
— cut —

run /etc/wwwstart from your /etc/netstart Tcpip stack startup file or
whatever way you do it. it includes

— cut —
#!/bin/sh

export HTTPD_ROOT_DIR=/pub/www/doc
export HTTPD_SCRIPTALIAS=/pub/www/cgi
/usr/ucb/slinger -d &
— cut —

i.e. your www document root directory is /pub/www/doc and CGI scripts
directory (that hard “/cgi-bin” stuff) is /pub/www/cgi

root page includes

— cut —

Main Test Page

Document Root

Execute CGI script --- cut ---

i.e. there’s a link on your CGI script. and script itself includes

— cut —
#!/bin/sh

echo “Content-Type: text/html\n”
echo “”
echo “”
echo “CGI script generated data”
echo “

Link on itself
echo “

Link on document root
echo “”
echo “”
— cut —

i.e. it generates two links: on itself and on main page.

i’v checked it under qnx4.25E/Tcpip5b it works fine as was expected. checked
with voyager 2.02/QNX4 and IE 5.05/Win2k.

enjoy

We are trying to run CGI applications from our HTMLs on a QNX 4 system.
Our
CGI’s will not execute. We are starting slinger as follows:

export HTTPD_ROOT_DIR=/web/html
export HTTPD_ROOT_DOC=test.html
export HTTPD_SCRIPTALIAS=/web/cgi
slinger -s -e -d &

The link in our HTML looks as follows:
a href=/cgi-bin/test.cgi>Test Link</a

When executing our HTML over a network using Explorer, Slinger finds our
root document immediately and displays the test.html. When trying to
execute the CGI link, Explorer will display ‘The page cannot be displayed’
(test.cgi is located in /web/cgi).

The type of error still makes me think that I am missing something in
either
QNX’s cofiguration or in the setup of the calling HTML.

I have placed various prints in my CGI code and have verified that the
CGI’s
are never started. ‘syslogd’ gives me an error for slinger of:

“Could not start CGI script /web/cgi/test.cgi: Operation not permitted”
“Error parsing CGI script HTTP header data. Sending raw data”

Which does verify that Slinger recognizes my CGI directory, however it
will
not execute the commands. Currently all my test CGIs are ‘C’ binaries.

I have verified that Slinger’s environment variables include the
definition
of HTTPD_SCRIPTALIAS, which is my understanding of how CGI processing is
enabled. Is there something else I need to do to enable CGI processing?
Does the calling HTML need to specify a particular version?




Any suggestions would be appreciated.

Thanks

// wbr



begin 666 www-script.tar.gz
M’XL("-"S\3LW=W=W-C<BYT87(`[5A=;YLP%.TSO\++I+VE!HQ!FBA2ED1K MI%3)4EXF3:H(. D:-0C,DO;7SPX)D*Y-%:U0;?%Y,89K7]O']PO"_(NFH:JJ MA3$0+<?3MNBH%K(,A#0364#5=!4A<($;7QE'GC$OY4L)/?KH+5^62^.8'9OG MZ>;^$1#FP_5Z+0[AZ/;^!H+_/WFO^->P7O*/37X7-&3I&O_>U(+J.'/^/WZ M\Y#";*4H9)/$*0/7KCL=W,TF$_=N,)I=P22?BQL"@]@_%+GMST93MS<>]6XK M*7\9*C#/4IC[<YA%(5V2%'0#\$EY[YU*/(?2_N.D,1VOV;_*@T/I_U4L[!]C M).V_#=3LOWB(O ?077P#>]O5'1B07Y#F421-^/\#]]N-ZS@E_S,L?9O_&3+_ M:P6[N-VHCI/X-TW!O\FO@>2_!=2RN\9TG%3_F4C$?P.9DO\V4.,?AC0@F\L5 MNX_>5@<_#],P7N9?1S7[5T7]C[$JZ[]6H-C7[LW847@[[ T<Q79'[GCHW'@A M!2[)&)AZ2V+#XJUBPT)*L;],!M]%FSB#V,_O"65@QD]H^\;VP"HEBZN.J :[ M(JMD?*9+WNDXPPWQ<T9 _^L(9'X:)LR&GI@(%C-R#=OUO/>YG MJ=7MC.D[Q M_Y9:^']=^O]64.._M-*WUO$:_\BJ_O^A;?S'&K:D_V\#]?]__BH&G7Y,&??F M7?<A(9\!(QL&14;P@W9V`D7 *'M;M[WO55X=+ DEJ<=(*/>:7X>@P#NE/
M$%,0LHQ$"Q$9GAU8)2K5D& ?A@11!R/AP1)W:8C(XR$A,29XS=\7DBW!X!````
end

Ian,

Thanks. You definitely gave me something to go on.

My problem ended up being that I stole my ‘C’ makefile from a driver
application I just recently completed that required the ‘-T1’ compiler
directive. As a result Slinger couldn’t execute my ‘C’ application. Using
your shell definitely pointed me in the right direction.

Thanks again.

“ian zagorskih” <ianzag@novosoft-us.com> wrote in message
news:9srnqk$m2l$1@inn.qnx.com

“Tom Stave” <> thstave@home.com> > wrote in message
news:9srgud$hkn$> 1@inn.qnx.com> …

put attached archive file at your qnx4 root directory and unpack. it
contains the following files:

— cut —
drwxr-xr-x 0/0 0 Nov 14 05:58 2001 etc
-rwx------ 0/0 106 Nov 14 05:57 2001 etc/wwwstart
-rwx------ 0/0 45 Nov 14 05:57 2001 etc/wwwstop
drwxr-xr-x 0/0 0 Nov 14 05:56 2001 pub
drwxr-xr-x 0/0 0 Nov 14 05:56 2001 pub/www
drwxr-xr-x 0/0 0 Nov 14 05:58 2001 pub/www/doc
-rw-r–r-- 0/0 152 Nov 14 05:55 2001 pub/www/doc/index.html
drwxr-xr-x 0/0 0 Nov 14 05:58 2001 pub/www/cgi
-rwxr-xr-x 0/0 250 Nov 14 05:55 2001 pub/www/cgi/test.cgi
— cut —

run /etc/wwwstart from your /etc/netstart Tcpip stack startup file or
whatever way you do it. it includes

— cut —
#!/bin/sh

export HTTPD_ROOT_DIR=/pub/www/doc
export HTTPD_SCRIPTALIAS=/pub/www/cgi
/usr/ucb/slinger -d &
— cut —

i.e. your www document root directory is /pub/www/doc and CGI scripts
directory (that hard “/cgi-bin” stuff) is /pub/www/cgi

root page includes

— cut —
HTML
HEAD
TITLE>Main Test Page</TITLE
/HEAD
BODY
p>Document Root
p>Execute CGI script</a
/BODY
/HTML
— cut —

i.e. there’s a link on your CGI script. and script itself includes

— cut —
#!/bin/sh

echo “Content-Type: text/html\n”
echo “”
echo “”
echo “CGI script generated data”
echo “

Link on itself
echo “

Link on document root
echo “”
echo “”
— cut —

i.e. it generates two links: on itself and on main page.

i’v checked it under qnx4.25E/Tcpip5b it works fine as was expected.
checked
with voyager 2.02/QNX4 and IE 5.05/Win2k.

enjoy

We are trying to run CGI applications from our HTMLs on a QNX 4 system.
Our
CGI’s will not execute. We are starting slinger as follows:

export HTTPD_ROOT_DIR=/web/html
export HTTPD_ROOT_DOC=test.html
export HTTPD_SCRIPTALIAS=/web/cgi
slinger -s -e -d &

The link in our HTML looks as follows:
a href=/cgi-bin/test.cgi>Test Link</a

When executing our HTML over a network using Explorer, Slinger finds our
root document immediately and displays the test.html. When trying to
execute the CGI link, Explorer will display ‘The page cannot be
displayed’
(test.cgi is located in /web/cgi).

The type of error still makes me think that I am missing something in
either
QNX’s cofiguration or in the setup of the calling HTML.

I have placed various prints in my CGI code and have verified that the
CGI’s
are never started. ‘syslogd’ gives me an error for slinger of:

“Could not start CGI script /web/cgi/test.cgi: Operation not permitted”
“Error parsing CGI script HTTP header data. Sending raw data”

Which does verify that Slinger recognizes my CGI directory, however it
will
not execute the commands. Currently all my test CGIs are ‘C’ binaries.

I have verified that Slinger’s environment variables include the
definition
of HTTPD_SCRIPTALIAS, which is my understanding of how CGI processing is
enabled. Is there something else I need to do to enable CGI processing?
Does the calling HTML need to specify a particular version?




Any suggestions would be appreciated.

Thanks


// wbr
\