Shaun: Thank you.
I tried with <!--#exec cmd='perl /absolute/path/to/domain.com/cgi-bin/script.pl' --> And it worked Answering some things. I'm hosting on a Cobalt server in Linux. I got no differences using or not the spacebefore "-->". Anyway It's now in the script. As I said, the only way I was getting the SSI to work was having 'script.pl' inside the 'cgi-bin' and inside the new 'cgi-bin' in the subdomain. Weird isn't it??. If I erased 'domain.com/cgi-bin/script.pl' there was a 'Permission denied' message If I erased 'domain.com/subdomain/cgi-bin/script.pl' there was a 'path/to/script.pl not found' message If I used the absolute path to any of both files there was a message: 'an error ocurred while processing this directive' On the other hand, my only compliant with Shaun method is that, being as a command line request I get the 'Content-type: text/html' hedaer in the output, and this makes (at least now) not possible for me to use the same scripts for the subdomain SSI than for direct access links. I'll have to rewrite special scripts for SSI calling from sibdomain, removing the headers. But that's better than keep getting errors. Any comments? > I get an error message, saying something like: > 'Can't locate file path-to/domain.com/subdomain/cgi-bin/script.pl' > > I have tried both ways: > > <!--#include virtual="/cgi-bin/script.pl"--> > <!--#exec cgi="/cgi-bin/script.pl"--> > > and haven't worked. I'm using '/' before cgi-bin to send the command to the > root, but still get the same message I apologise in advance if I misunderstand your question, but here's my college try fwiw. #1. what platform/httpd? .. (I'll assume Unix/Apache) .. Have you tried emailing the Apache httpd mailing list? #2. My experience with doing this is fairly extensive, since I do this alot, albeit on my own OpenBSD web-server right under my desk (thus I am the admin). Here's my take on it. SSI are relative to the server path, not the http path, so anything starting with a / is pointing to the root filesystem on the server (or chroot environment). My usual MO with this is to not worry about executable bits and whatnot. Instead I use an SSI such as follows... <!--#exec cmd='perl ./relative/path/to/script.pl' --> or... <!--#exec cmd='perl /absolute/path/to/script.pl' --> which in your case would probably be... <!--#exec cmd='perl ./cgi-bin/script.pl' --> *notice the space before the closing --> !! Anyway, this has always worked like a charm for me, and since this way I don't have to set the executable bits on my script, it avoids some common security issues aswell. Though do keep in mind that the .pl is still recieving the GET method QUERY_STRING from the .shtml. Of course it would depend on the setup provided by your hosting service. I am my ISP, so <shrug> I have free rein within the limits of good sense. Btw, doing it this way you can even pass variables to the script as follow... <!--#exec cmd='perl script.pl var1 var2 var3 ...' --> -- ===================== Shaun Fryer ===================== http://sourcery.ca/ ph: 905-529-0591 ===================== Science is like sex: occasionally something useful comes out of it, but that's not why we do it. -: Richard Feynmann ----- Original Message ----- From: "Shaun Fryer" <[EMAIL PROTECTED]> To: "Ramon Chavez" <[EMAIL PROTECTED]> Sent: Thursday, September 25, 2003 3:58 PM Subject: Re: SSI in subdomains -- To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]