Link to home
Start Free TrialLog in
Avatar of nifer
nifer

asked on

<!--#exec cgi="list.cgi/elev"--> ???

I need to get the output from one script(WILMA) to get included via SSI to one page.
this script (http://scc.crossnet.se/cgi-bin/kyrktorget/list)
is a linkorganisation script.
The problem is that the categories looks like "list/svk" but
list is NOT a directory but a cgi command(perl).
And "/svk" is just a variable to that script.
My question is. Are there any way to directly include the "list/svk" directly into the webpage or by running it from the prompt?

The problem is that executing "list/svk" from the prompt or SSI means that you should start svk in the directory list.

Can anyone help me?

Linux/ Apache
Avatar of ozo
ozo
Flag of United States of America image

What server are you using?
Avatar of nifer
nifer

ASKER

Edited text of question
Avatar of nifer

ASKER

Running a Pentium Linux, with Apache webserver
try
<!--#exec cmd="list.cgi path=elev"-->
$ENV{PATH_INFO} should be set from the original file,
but you should be able to see @ARGV when called with cmd=
Avatar of nifer

ASKER

How do I fix that?

the source is here:
http://scc.crossnet.se/kyrktorget/list


Maybe something like:

$_ = $ENV{PATH_INFO};
$_ = $1 if( $ARGV[0]=~/\bpath=(\S)*/i );
s|^/*\.*!!;   # strip leading /.
$path_info = $_;


(But I wonder if it might also work to have
<HEAD> <BASE HREF="http://scc.crossnet.se/cgi-bin/kyrktorget/list"> </HEAD>
<!--#exec cgi="list.cgi"-->
and have the path set from the new base?)

On second thought, I don't think <BASE HREF> will work, but you might try something like:
<!--#exec cmd="PATH_INFO=/svk; export PATH_INFO; /usr/local/etc/httpd/cgi-bin/kyrktorget/list.cgi"-->
Avatar of nifer

ASKER

The <!--#exec cmd="PATH_INFO=/svk; export PATH_INFO; /usr/local/etc/httpd/cgi-bin/kyrktorget/list.cgi"-->
Worked Well!!
But the changes of the script was not necessary, (didnt work at all)..

Thanks!
ASKER CERTIFIED SOLUTION
Avatar of ozo
ozo
Flag of United States of America image

Link to home
membership
This solution is only available to members.
To access this solution, you must be a member of Experts Exchange.
Start Free Trial