CGI Executable

I have compiled an executable CGI and for the sake of simplicity set the
environment as follows:

HTTPD_ROOT_DIR=/usr/www/httpd
HTTPD_ROOT_DOC=/usr/www/MYCGI
HPPTD_SCRIPTALIAS=/usr/www/httpd

I have ensured that the CGI has both read and execute permissions using
chmod (chmod 555 MYCGI).

From a remote client I can access the CGI, however the output is not what I
expected. It is for the most part binary, with some text from the source
and strangely some HTML which is correct and the form elements do work, I
suspect what I am seeing is the binary of the exectuable being downloaded as
text.

I am unsure why and what I am doing wrong. I am using the tiny tcp stack
and slinger.

Thank you,

Simon Platten, Senior Software Engineer

VT Controls
Bessemer Way, Harfreys Industrial Estate, Great Yarmouth, Norfolk, NR31 0LX.
Tel: (0)1493 668811 Fax: (0)1493 651137
Email: simon.platten@vtcontrols.co.uk

Any views or opinions expressed are solely those of the author and do not
necessarily
represent those of VT Group, its holding company or any of its subsidiaries
or associates.

After a little reading I’ve modified the configuration to:

HTTPD_ROOT_DIR=/usr/www/httpd
HTTPD_ROOT_DOC=/usr/www/MYCGI
HTTPD_SCRIPTALIAS=/usr/www/cgi

According to a document I found on the right and wrong way to set-up slinger
and CGI. I believe I’m right in thinking that to access the CGI I should
use the URL:

http://hostname/cgi-bin/MYCGI

The cgi-bin indicating that it is an executable CGI not the path as this is
obtained from the SCRIPTALIAS environment variable.

Still doesn’t work and now I’m getting 404 Page not found.

“Simon A. Platten” <simon.platten@vtcontrols.co.uk> wrote in message
news:aqo0k0$i35$1@inn.qnx.com

I have compiled an executable CGI and for the sake of simplicity set the
environment as follows:

HTTPD_ROOT_DIR=/usr/www/httpd
HTTPD_ROOT_DOC=/usr/www/MYCGI
HPPTD_SCRIPTALIAS=/usr/www/httpd

I have ensured that the CGI has both read and execute permissions using
chmod (chmod 555 MYCGI).

From a remote client I can access the CGI, however the output is not what
I
expected. It is for the most part binary, with some text from the source
and strangely some HTML which is correct and the form elements do work, I
suspect what I am seeing is the binary of the exectuable being downloaded
as
text.

I am unsure why and what I am doing wrong. I am using the tiny tcp stack
and slinger.

Thank you,

Simon Platten, Senior Software Engineer

VT Controls
Bessemer Way, Harfreys Industrial Estate, Great Yarmouth, Norfolk, NR31
0LX.
Tel: (0)1493 668811 Fax: (0)1493 651137
Email: > simon.platten@vtcontrols.co.uk

Any views or opinions expressed are solely those of the author and do not
necessarily
represent those of VT Group, its holding company or any of its
subsidiaries
or associates.

After trying to run the CGI executable on the target from the shell, it
turns out theres a Memory Fault in the executable which could explain all.

I’m looking into this now and will post when I resolve the Memory Fault.

“Simon A. Platten” <simon.platten@vtcontrols.co.uk> wrote in message
news:aqo0k0$i35$1@inn.qnx.com

I have compiled an executable CGI and for the sake of simplicity set the
environment as follows:

HTTPD_ROOT_DIR=/usr/www/httpd
HTTPD_ROOT_DOC=/usr/www/MYCGI
HPPTD_SCRIPTALIAS=/usr/www/httpd

I have ensured that the CGI has both read and execute permissions using
chmod (chmod 555 MYCGI).

From a remote client I can access the CGI, however the output is not what
I
expected. It is for the most part binary, with some text from the source
and strangely some HTML which is correct and the form elements do work, I
suspect what I am seeing is the binary of the exectuable being downloaded
as
text.

I am unsure why and what I am doing wrong. I am using the tiny tcp stack
and slinger.

Thank you,

Simon Platten, Senior Software Engineer

VT Controls
Bessemer Way, Harfreys Industrial Estate, Great Yarmouth, Norfolk, NR31
0LX.
Tel: (0)1493 668811 Fax: (0)1493 651137
Email: > simon.platten@vtcontrols.co.uk

Any views or opinions expressed are solely those of the author and do not
necessarily
represent those of VT Group, its holding company or any of its
subsidiaries
or associates.

I hang my head in shame…after setting ftp to binary mode before
transferring the cgi executable to the target it all worked perfectly.

doh!

“Simon A. Platten” <simon.platten@vtcontrols.co.uk> wrote in message
news:aqo0k0$i35$1@inn.qnx.com

I have compiled an executable CGI and for the sake of simplicity set the
environment as follows:

HTTPD_ROOT_DIR=/usr/www/httpd
HTTPD_ROOT_DOC=/usr/www/MYCGI
HPPTD_SCRIPTALIAS=/usr/www/httpd

I have ensured that the CGI has both read and execute permissions using
chmod (chmod 555 MYCGI).

From a remote client I can access the CGI, however the output is not what
I
expected. It is for the most part binary, with some text from the source
and strangely some HTML which is correct and the form elements do work, I
suspect what I am seeing is the binary of the exectuable being downloaded
as
text.

I am unsure why and what I am doing wrong. I am using the tiny tcp stack
and slinger.

Thank you,

Simon Platten, Senior Software Engineer

VT Controls
Bessemer Way, Harfreys Industrial Estate, Great Yarmouth, Norfolk, NR31
0LX.
Tel: (0)1493 668811 Fax: (0)1493 651137
Email: > simon.platten@vtcontrols.co.uk

Any views or opinions expressed are solely those of the author and do not
necessarily
represent those of VT Group, its holding company or any of its
subsidiaries
or associates.

Don’t feel too bad. It’s happened to us all at one time or another.

:wink:

Kris

“Simon A. Platten” <simon.platten@vtcontrols.co.uk> wrote in message
news:aqo51v$mt0$1@inn.qnx.com

I hang my head in shame…after setting ftp to binary mode before
transferring the cgi executable to the target it all worked perfectly.

doh!