SSI: Exec cgi causes include virtual not to work

AndrewT

Well-Known Member
#1
Not looking good for LiteSpeed's SSI support right about now. This is the second problem I've discovered in 3 days.

Code:
<!--#exec cgi="cgi-bin/ax_203.pl" -->
<!--#include virtual="f/SSI.php?ssi_function=recentPosts" -->
With the exec cgi prior to the include virtual, the include virtual does not work and the following error is reported in the error_log:

Code:
Server Side Include request a CGI script, [/f/SSI.php] is not a CGI script, access denied.
When the exec cgi is removed the include works exactly as it is supposed to. This, of course, wasn't an issue with Apache.

This is occurring on 4.0.13.
 

AndrewT

Well-Known Member
#5
Looks good to me. I'll have our client confirm and will report back if I find anything further. Thanks a bunch for getting these taken care of.
 

ffeingol

Well-Known Member
#8
it's basically:

Code:
#include virtual="cgi-bin/blah.cgi"
Where blah.cgi is a perl script. Works fine when .shtml's are proxied to Apache (which we are trying to turn off). We don't see anything in the error log.
 

mistwang

LiteSpeed Staff
#9
Does URL "/cgi-bin/blah.cgi" work when you access it directly?
file "cgi-bin/blah.cgi" should be relative to the shtml including it.
 

ffeingol

Well-Known Member
#10
It is relative. The cgi-bin folder is under the sites root and the main .shtml file is being run from the document root. Yes, it more or less works if you access it via /cgi-bin/blah.cgi. It does not output proper headers you you get some errors. It basically splits out HTML code that needs to be embedded within the web page.
 

mistwang

LiteSpeed Staff
#11
It does not output proper headers you you get some errors. It basically splits out HTML code that needs to be embedded within the web page.
That could be the problem with our SSI implementation, the SSI engine does expect valid response headers, headers will be stripped.
Not sure how Apache handle this.
 
Top