#109 lxr.css and CGI script handling mode

current_cvs
closed-fixed
Malcolm Box
Browsing (93)
5
2009-03-23
2005-06-09
Andrea Barbieri
No

Hello,

in LXR v0.9.4 whenswitching .htaccess to be the CGI
mode one, the lxr.css file generates the following
apache (v1.3.x and v2.0.x) server error:
file permissions deny server execution: /var/lxr/lxr.css

there is no valid file permissions to resolve the error.

the root of the problem is in the <Files> section of
the .htaccess (cgi style):
<Files ~ (find|search|source|ident|diff|cgi-bin)$>
SetHandler cgi-script
ForceType text/html
</Files>

the use of the SetHandler directive forces *all* files to be
treated as cgi scripts, even the stylesheet file.

a better approach would be to suffix the scripts with .pl
and use the AddHandler directive.
this way the stylesheet will be treated normally.

many thanks
andrea

Discussion

  • gd-smith
    gd-smith
    2005-06-10

    Logged In: YES
    user_id=1293603

    Can I assume this is why I don't see the style sheet
    effects, e.g., green bar across top, better file display, etc.?

    If so, what files do I need to change to <name>.pl? The ones
    listed in the <Files ~(find|...)$> including source? Do I
    need to run genxref again?

    Also, how come this seemed to work ok with 0.9.3?

     
  • Logged In: YES
    user_id=65472

    Hello,

    the reason for the posting is actually to get the maintainers of
    the code to properly resolve the issue...

    this actually requires a more thoughtful approach ...

    and probably changing the involved filenames in all the
    occurrences, deep down in all .pm files will be required ... not
    just at the top level (and in the .htaccess) files

    bests
    andrea

     
  • Ben Gamari
    Ben Gamari
    2005-06-17

    Logged In: YES
    user_id=97638

    I am running apache-2.0.52 and changing the ScriptAlias to a
    normal Alias directive has somehow fixed the problem given
    that the CGI .htaccess is used.

     
  • Ben Gamari
    Ben Gamari
    2005-06-17

    Logged In: YES
    user_id=97638

    I am running apache-2.0.52 and changing the ScriptAlias to a
    normal Alias directive has somehow fixed the problem given
    that the CGI .htaccess is used.

     
  • Logged In: YES
    user_id=65472

    According to the INSTALL text file it is possible to use
    Apache without the mod_perl (running scrpts as CGI)...

    This is why in this configuration ScriptAlias must be used in
    httpd.conf and the .htaccess_cgi renamed to .htaccess.

    Only with this setup the problem mention in this thread is
    experienced.

     
  • Malcolm Box
    Malcolm Box
    2005-06-20

    Logged In: YES
    user_id=215386

    I'm having problems reproducing this problem here - I see no
    error messages about lxr.css, with ScriptAlias or Alias.

    However, I do think there is an error in the installation
    instructions in suggesting that the lxr directory should be
    ScriptAlias'ed rather than Alias'ed - could those with
    either more Apache experience or who have lxr using CGI
    running comment on what they are using?

    I'm reluctant to change the extensions of all the files, as
    that wouldn't appear to be necessary to get Apache to do the
    right thing.

    Thanks,

    Malcolm

     
  • Malcolm Box
    Malcolm Box
    2005-06-20

    • assigned_to: nobody --> mbox
     
  • Malcolm Box
    Malcolm Box
    2009-03-23

    Fixed with update to the .htaccess_cgi file to treat lxr.css as a default (non-script) file.

    Thanks for reporting this - CGI isn't tested as much as it could be!

     
  • Malcolm Box
    Malcolm Box
    2009-03-23

    • status: open --> closed-fixed