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
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
What server are you using?
ASKER
Edited text of question
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=
<!--#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=
ASKER
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?)
$_ = $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-b in/kyrktor get/list.c gi"-->
<!--#exec cmd="PATH_INFO=/svk; export PATH_INFO; /usr/local/etc/httpd/cgi-b
ASKER
The <!--#exec cmd="PATH_INFO=/svk; export PATH_INFO; /usr/local/etc/httpd/cgi-b in/kyrktor get/list.c gi"-->
Worked Well!!
But the changes of the script was not necessary, (didnt work at all)..
Thanks!
Worked Well!!
But the changes of the script was not necessary, (didnt work at all)..
Thanks!
ASKER CERTIFIED SOLUTION
membership
This solution is only available to members.
To access this solution, you must be a member of Experts Exchange.