SSI: Exec cgi causes include virtual not to work

Discussion in 'Bug Reports' started by AndrewT, Mar 22, 2010.

  1. AndrewT

    AndrewT New Member

    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.
  2. AndrewT

    AndrewT New Member

    Wonderful lack of response here and this is (also) not fixed in 4.0.14.
  3. mistwang

    mistwang LiteSpeed Staff

    Sorry, overlooked this one. working on it.
  4. mistwang

    mistwang LiteSpeed Staff

    This issue should be addressed with the latest update of 4.0.14.
  5. AndrewT

    AndrewT New Member

    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.
  6. ffeingol

    ffeingol New Member

    we're setting this issue and we're past the .14 release.
  7. mistwang

    mistwang LiteSpeed Staff

    Maybe it is a different issue. Can you give us detailed test case?
  8. ffeingol

    ffeingol New Member

    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.
  9. mistwang

    mistwang LiteSpeed Staff

    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.
  10. ffeingol

    ffeingol New Member

    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.
  11. mistwang

    mistwang LiteSpeed Staff

    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.
  12. ffeingol

    ffeingol New Member

    Well it works under Apache so it should work under LSWS. Feel free to PM me if you need the actual code/cgi for testing.

Share This Page