CGI & Slinger

I have done some CGI to use with Slinger. It works perfectly when I run
Slinger on the developement host. But when my target boot from a floppy and
launch Slinger , the CGI don’t work anymore. I certainly forget to include
some files in my image but I don’t know wich files…

Could someone help me?

Hi Jean-Yves,

What do you mean by it doesn’t work anymore? What errors are you seeing?
Do you have libsocket in your image? Have you tried running slinger with
debug
and looking at the syslog output?

Regards,
Barry F.

Hercot Jean-Yves <fa063821@skynet.be> wrote in message
news:b7e5rj$cda$1@inn.qnx.com

I have done some CGI to use with Slinger. It works perfectly when I run
Slinger on the developement host. But when my target boot from a floppy
and
launch Slinger , the CGI don’t work anymore. I certainly forget to
include
some files in my image but I don’t know wich files…

Could someone help me?

I mean that I can’t call a cgi when slinger is running on a embedded system.
It works perfectly when running on the development host. I have tried to
run slinger with -d option and the syslog file stay empty…

I have also tried to change the rights of the cgi and user Id but it was
unsuccefull.

I have seen in slinger docs that it uses PATH variable. Does slinger use an
binary situated in that path in order to run a Cgi?

Ps: I don’t have problem to get html pages from slinger when it is embedded.
“OS Support” <os@qnx.com> a écrit dans le message de news:
b7h14p$kek$1@nntp.qnx.com

Hi Jean-Yves,

What do you mean by it doesn’t work anymore? What errors are you seeing?
Do you have libsocket in your image? Have you tried running slinger with
debug
and looking at the syslog output?

Regards,
Barry F.

Hercot Jean-Yves <> fa063821@skynet.be> > wrote in message
news:b7e5rj$cda$> 1@inn.qnx.com> …
I have done some CGI to use with Slinger. It works perfectly when I run
Slinger on the developement host. But when my target boot from a floppy
and
launch Slinger , the CGI don’t work anymore. I certainly forget to
include
some files in my image but I don’t know wich files…

Could someone help me?
\

Nb: When I call a Cgi it returns http error code 503 (service unavailable)

“Hercot Jean-Yves” <fa063821@skynet.be> a écrit dans le message de news:
b7je2o$gg7$1@inn.qnx.com

I mean that I can’t call a cgi when slinger is running on a embedded
system.
It works perfectly when running on the development host. I have tried to
run slinger with -d option and the syslog file stay empty…

I have also tried to change the rights of the cgi and user Id but it was
unsuccefull.

I have seen in slinger docs that it uses PATH variable. Does slinger use
an
binary situated in that path in order to run a Cgi?

Ps: I don’t have problem to get html pages from slinger when it is
embedded.
“OS Support” <> os@qnx.com> > a écrit dans le message de news:
b7h14p$kek$> 1@nntp.qnx.com> …
Hi Jean-Yves,

What do you mean by it doesn’t work anymore? What errors are you seeing?
Do you have libsocket in your image? Have you tried running slinger with
debug
and looking at the syslog output?

Regards,
Barry F.

Hercot Jean-Yves <> fa063821@skynet.be> > wrote in message
news:b7e5rj$cda$> 1@inn.qnx.com> …
I have done some CGI to use with Slinger. It works perfectly when I
run
Slinger on the developement host. But when my target boot from a
floppy
and
launch Slinger , the CGI don’t work anymore. I certainly forget to
include
some files in my image but I don’t know wich files…

Could someone help me?


\

Hi Jean-Yves,

I have included a sample slinger build file. You may have to modify it
so that it uses the correct nic card and the proper directory which
contains your html and cgi files.

Regards,
Barry F.

Sample slinger build file

[virtual=x86,bios +compress] boot = {
startup-bios
PATH=/proc/boot procnto -vv
}

[+script] startup-script = {

Programs require the runtime linker to be at a fixed location

procmgr_symlink …/…/proc/boot/libc.so.2 /usr/lib/ldqnx.so.2

Start up some consoles

devc-con -n4 &
reopen /dev/con1

display_msg slinger on a PC compatible BIOS system

Start the pci server

seedres
pci-bios &
waitfor /dev/pci

Start io-net

io-net -depic -pttcpip if=en0:192.168.10.17 &
waitfor /dev/io-net

Some common servers

pipe &
devc-pty &

These env variables inherited by all the programs which follow

SYSNAME=nto
TERM=qansi
HTTPD_ROOT_DIR=/web
HTTPD_ROOT_DOC=index.html
HTTPD_SCRIPTALIAS=/web/cgi-bin

Start slinger

slinger &

Start some extra shells on other consoles

reopen /dev/con2
[+session] sh &
reopen /dev/con3
[+session] sh &

Start a high priority shell just in case…

reopen /dev/con4
[pri=25 +session] sh &

Start the main shell

reopen /dev/con1
[+session] sh
}

Cheat and make the /temp point to the shared memory area…

[type=link] /tmp=/dev/shmem

We use the “c” shared lib (which also contains the runtime linker)

libc.so

libs required for io-net

libsocket.so.2
devn-epic.so
npm-ttcpip.so

The files above this line can be shared by mutiple processes

[data=c]

Executables must currently be below this line

Include a console driver

devc-con

Include pci server

pci-bios
seedres

Include directory containing html/cgi files

/web=/web

Use the embedded shell as the default shell “sh”

sh=esh

Other executables

pipe
devc-pty
ls
pidin
io-net
slinger
slay
cat

End slinger build file

Hercot Jean-Yves <fa063821@skynet.be> wrote in message
news:b7jeaf$gh2$1@inn.qnx.com

Nb: When I call a Cgi it returns http error code 503 (service
unavailable)

“Hercot Jean-Yves” <> fa063821@skynet.be> > a écrit dans le message de news:
b7je2o$gg7$> 1@inn.qnx.com> …
I mean that I can’t call a cgi when slinger is running on a embedded
system.
It works perfectly when running on the development host. I have tried
to
run slinger with -d option and the syslog file stay empty…

I have also tried to change the rights of the cgi and user Id but it was
unsuccefull.

I have seen in slinger docs that it uses PATH variable. Does slinger
use
an
binary situated in that path in order to run a Cgi?

Ps: I don’t have problem to get html pages from slinger when it is
embedded.
“OS Support” <> os@qnx.com> > a écrit dans le message de news:
b7h14p$kek$> 1@nntp.qnx.com> …
Hi Jean-Yves,

What do you mean by it doesn’t work anymore? What errors are you
seeing?
Do you have libsocket in your image? Have you tried running slinger
with
debug
and looking at the syslog output?

Regards,
Barry F.

Hercot Jean-Yves <> fa063821@skynet.be> > wrote in message
news:b7e5rj$cda$> 1@inn.qnx.com> …
I have done some CGI to use with Slinger. It works perfectly when I
run
Slinger on the developement host. But when my target boot from a
floppy
and
launch Slinger , the CGI don’t work anymore. I certainly forget to
include
some files in my image but I don’t know wich files…

Could someone help me?




\

Ok it works now! I didn’t launch the pipe process. It seems slinger
requires it to execute Cgi…

Thank you very much!

“OS Support” <os@qnx.com> a écrit dans le message de news:
b7jrin$g0h$1@nntp.qnx.com

Hi Jean-Yves,

I have included a sample slinger build file. You may have to modify it
so that it uses the correct nic card and the proper directory which
contains your html and cgi files.

Regards,
Barry F.

Sample slinger build file

[virtual=x86,bios +compress] boot = {
startup-bios
PATH=/proc/boot procnto -vv
}

[+script] startup-script = {

Programs require the runtime linker to be at a fixed location

procmgr_symlink …/…/proc/boot/libc.so.2 /usr/lib/ldqnx.so.2

Start up some consoles

devc-con -n4 &
reopen /dev/con1

display_msg slinger on a PC compatible BIOS system

Start the pci server

seedres
pci-bios &
waitfor /dev/pci

Start io-net

io-net -depic -pttcpip if=en0:192.168.10.17 &
waitfor /dev/io-net

Some common servers

pipe &
devc-pty &

These env variables inherited by all the programs which follow

SYSNAME=nto
TERM=qansi
HTTPD_ROOT_DIR=/web
HTTPD_ROOT_DOC=index.html
HTTPD_SCRIPTALIAS=/web/cgi-bin

Start slinger

slinger &

Start some extra shells on other consoles

reopen /dev/con2
[+session] sh &
reopen /dev/con3
[+session] sh &

Start a high priority shell just in case…

reopen /dev/con4
[pri=25 +session] sh &

Start the main shell

reopen /dev/con1
[+session] sh
}

Cheat and make the /temp point to the shared memory area…

[type=link] /tmp=/dev/shmem

We use the “c” shared lib (which also contains the runtime linker)

libc.so

libs required for io-net

libsocket.so.2
devn-epic.so
npm-ttcpip.so

The files above this line can be shared by mutiple processes

[data=c]

Executables must currently be below this line

Include a console driver

devc-con

Include pci server

pci-bios
seedres

Include directory containing html/cgi files

/web=/web

Use the embedded shell as the default shell “sh”

sh=esh

Other executables

pipe
devc-pty
ls
pidin
io-net
slinger
slay
cat

End slinger build file

Hercot Jean-Yves <> fa063821@skynet.be> > wrote in message
news:b7jeaf$gh2$> 1@inn.qnx.com> …
Nb: When I call a Cgi it returns http error code 503 (service
unavailable)

“Hercot Jean-Yves” <> fa063821@skynet.be> > a écrit dans le message de news:
b7je2o$gg7$> 1@inn.qnx.com> …
I mean that I can’t call a cgi when slinger is running on a embedded
system.
It works perfectly when running on the development host. I have tried
to
run slinger with -d option and the syslog file stay empty…

I have also tried to change the rights of the cgi and user Id but it
was
unsuccefull.

I have seen in slinger docs that it uses PATH variable. Does slinger
use
an
binary situated in that path in order to run a Cgi?

Ps: I don’t have problem to get html pages from slinger when it is
embedded.
“OS Support” <> os@qnx.com> > a écrit dans le message de news:
b7h14p$kek$> 1@nntp.qnx.com> …
Hi Jean-Yves,

What do you mean by it doesn’t work anymore? What errors are you
seeing?
Do you have libsocket in your image? Have you tried running slinger
with
debug
and looking at the syslog output?

Regards,
Barry F.

Hercot Jean-Yves <> fa063821@skynet.be> > wrote in message
news:b7e5rj$cda$> 1@inn.qnx.com> …
I have done some CGI to use with Slinger. It works perfectly when
I
run
Slinger on the developement host. But when my target boot from a
floppy
and
launch Slinger , the CGI don’t work anymore. I certainly forget
to
include
some files in my image but I don’t know wich files…

Could someone help me?






\