Slinger and CGIs

We have been using QNX 4 since it came out, but this is the first we have
tried to use it as a Web Server. We are encountering problems that I feel
must be simple configuration but I just can’t seem to find them.

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 &

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 found’
(test.cgi is located in /web/cgi). We have tried various CGI’s in both Perl
and ‘C’ that have tested OK when run independently. A look at ‘global -p’
shows all of our exports have been set correctly.

Any suggestions would be appreciated.

Thanks

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

We have been using QNX 4 since it came out, but this is the first we have
tried to use it as a Web Server. We are encountering problems that I feel
must be simple configuration but I just can’t seem to find them.

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 &

The link in our HTML looks as follows:
a href=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 found’
(test.cgi is located in /web/cgi). We have tried various CGI’s in both
Perl
and ‘C’ that have tested OK when run independently. A look at ‘global -p’
shows all of our exports have been set correctly.

Any suggestions would be appreciated.

http://qdn.qnx.com/support/docs/neutrino_2.11_en/utilities/s/slinger.html

try Test Link

Thanks

// wbr

Thanks for your response.

When using the prefix of /cgi-bin to my CGI scripts I receive an error
message from Explorer of “The page cannot be displayed”.

Is this an idication that my CGI’s are not as sound as I thought they were,
or am I still missing something?

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

“Tom Stave” <> thstave@home.com> > wrote in message
news:9sov5f$qhi$> 1@inn.qnx.com> …
We have been using QNX 4 since it came out, but this is the first we
have
tried to use it as a Web Server. We are encountering problems that I
feel
must be simple configuration but I just can’t seem to find them.

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 &

The link in our HTML looks as follows:
a href=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 found’
(test.cgi is located in /web/cgi). We have tried various CGI’s in both
Perl
and ‘C’ that have tested OK when run independently. A look at
‘global -p’
shows all of our exports have been set correctly.

Any suggestions would be appreciated.

http://qdn.qnx.com/support/docs/neutrino_2.11_en/utilities/s/slinger.html

try Test Link</a

Thanks

// wbr

Are you ensuring that the opening lines generated by your chosen cgi script
method are:

content-type: text/html

Otherwise it will not work.

Regards

Poseidon

Unfortunatly, I am still having problems. 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.

Slinger still will not execute my CGIs. Whether called directly from a HTML
href call or when included in SSI. 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”

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?


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

We have been using QNX 4 since it came out, but this is the first we have
tried to use it as a Web Server. We are encountering problems that I feel
must be simple configuration but I just can’t seem to find them.

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 &

The link in our HTML looks as follows:
a href=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 found’
(test.cgi is located in /web/cgi). We have tried various CGI’s in both
Perl
and ‘C’ that have tested OK when run independently. A look at ‘global -p’
shows all of our exports have been set correctly.

Any suggestions would be appreciated.

Thanks

Hi Tom,

you may have to check the file permissions for your cgi.
I think that slinger runs with a user id of -2 which means
that you should try chmod a+rx on your cgi to check.

Arnauld

“Tom Stave” <thstave@home.com> a écrit dans le message de news:
9srajt$dno$1@inn.qnx.com

Unfortunatly, I am still having problems. 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.

Slinger still will not execute my CGIs. Whether called directly from a
HTML
href call or when included in SSI. 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”

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?


“Tom Stave” <> thstave@home.com> > wrote in message
news:9sov5f$qhi$> 1@inn.qnx.com> …
We have been using QNX 4 since it came out, but this is the first we
have
tried to use it as a Web Server. We are encountering problems that I
feel
must be simple configuration but I just can’t seem to find them.

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 &

The link in our HTML looks as follows:
a href=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 found’
(test.cgi is located in /web/cgi). We have tried various CGI’s in both
Perl
and ‘C’ that have tested OK when run independently. A look at
‘global -p’
shows all of our exports have been set correctly.

Any suggestions would be appreciated.

Thanks



\

Make sure your HTML file has an extention of .shtml

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

We have been using QNX 4 since it came out, but this is the first we have
tried to use it as a Web Server. We are encountering problems that I feel
must be simple configuration but I just can’t seem to find them.

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 &

The link in our HTML looks as follows:
a href=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 found’
(test.cgi is located in /web/cgi). We have tried various CGI’s in both
Perl
and ‘C’ that have tested OK when run independently. A look at ‘global -p’
shows all of our exports have been set correctly.

Any suggestions would be appreciated.

Thanks

“Roelof van Wyk” <rwyk@irdetoaccess.com> wrote in message
news:9t0qrt$ksa$1@inn.qnx.com

Make sure your HTML file has an extention of .shtml

…shtml extention is needed when your HTML pages has SSI (Server Side
Includes) commands. it’s not required for executing links on CGI scripts.

“Tom Stave” <> thstave@home.com> > wrote in message
news:9sov5f$qhi$> 1@inn.qnx.com> …
We have been using QNX 4 since it came out, but this is the first we
have
tried to use it as a Web Server. We are encountering problems that I
feel
must be simple configuration but I just can’t seem to find them.

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 &

The link in our HTML looks as follows:
a href=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 found’
(test.cgi is located in /web/cgi). We have tried various CGI’s in both
Perl
and ‘C’ that have tested OK when run independently. A look at
‘global -p’
shows all of our exports have been set correctly.

Any suggestions would be appreciated.

Thanks

// wbr