You are viewing a plain text version of this content. The canonical link for it is here.
Posted to bugs@httpd.apache.org by bu...@apache.org on 2008/12/10 16:26:23 UTC

DO NOT REPLY [Bug 46375] New: SetHandler documentation doesn't correspond to real behaviour.

https://issues.apache.org/bugzilla/show_bug.cgi?id=46375

           Summary: SetHandler documentation doesn't correspond to real
                    behaviour.
           Product: Apache httpd-2
           Version: 2.2.10
          Platform: PC
        OS/Version: Linux
            Status: NEW
          Severity: normal
          Priority: P2
         Component: Documentation
        AssignedTo: bugs@httpd.apache.org
        ReportedBy: i.galic@brainsware.org


It says in http://httpd.apache.org/docs/2.2/mod/core.html#sethandler

"You can override an earlier defined SetHandler directive by using the value
None."

However that does not correspond to my experience:

# Server Context:
<FilesMatch \.php$>
        SetHandler application/x-httpd-php
        AddType text/html .php
        AddType application/xhtml+xml;qs=0.8 .php
</FilesMatch>

<VirtualHost 127.0.0.1:8006>
    ServerName http://somevhosthere:80
    DocumentRoot    /srv/web/somevhosthere/htdocs
    php_admin_value open_basedir /srv/web/somevhosthere/:/usr/share/pear/
    php_admin_value session.save_path /srv/web/somevhosthere/session/
    php_admin_value upload_tmp_dir /srv/web/somevhosthere/tmp/
    <Directory /srv/web/somevhosthere/htdocs/contents>
        SetHandler None                      # Does not work
        RemoveHandler php .php phps .phps    # Does not work
        php_admin_flag engine off            # Does not work
        AllowOverride None
        <Files *.php>
                SetHandler none              # Works
        </Files>
    </Directory>
</VirtualHost>


-- 
Configure bugmail: https://issues.apache.org/bugzilla/userprefs.cgi?tab=email
------- You are receiving this mail because: -------
You are the assignee for the bug.

---------------------------------------------------------------------
To unsubscribe, e-mail: bugs-unsubscribe@httpd.apache.org
For additional commands, e-mail: bugs-help@httpd.apache.org


DO NOT REPLY [Bug 46375] SetHandler documentation doesn't correspond to real behaviour.

Posted by bu...@apache.org.
https://issues.apache.org/bugzilla/show_bug.cgi?id=46375


Eric Covener <co...@gmail.com> changed:

           What    |Removed                     |Added
----------------------------------------------------------------------------
             Status|NEW                         |RESOLVED
         Resolution|                            |INVALID




--- Comment #1 from Eric Covener <co...@gmail.com>  2008-12-10 07:35:32 PST ---
It's earlier in the context of how the configuation is merged, not "earlier" in
the config file:

http://httpd.apache.org/docs/2.2/sections.html#mergin


-- 
Configure bugmail: https://issues.apache.org/bugzilla/userprefs.cgi?tab=email
------- You are receiving this mail because: -------
You are the assignee for the bug.

---------------------------------------------------------------------
To unsubscribe, e-mail: bugs-unsubscribe@httpd.apache.org
For additional commands, e-mail: bugs-help@httpd.apache.org


DO NOT REPLY [Bug 46375] SetHandler documentation doesn't correspond to real behaviour.

Posted by bu...@apache.org.
https://issues.apache.org/bugzilla/show_bug.cgi?id=46375





--- Comment #2 from Igor Galic <i....@brainsware.org>  2008-12-10 07:58:56 PST ---
In my previous post you see that the first <FilesMatch \.php$>, doing the
SetHandler *is* in the *ServerContext*:

http://httpd.apache.org/docs/2.2/sections.html#mergin perfectly agrees with the
previous paste from the docs:

"Sections inside <VirtualHost> sections are applied after the corresponding
sections outside the virtual host definition. This allows virtual hosts to
override the main server configuration."


However, why do I have to specify the "SetHandler None" in a <Files *.php>
container, to make it work?

I would expect that a SetHandler None in <Directory> would simply remove all
handlers.

Is that a misconception?


-- 
Configure bugmail: https://issues.apache.org/bugzilla/userprefs.cgi?tab=email
------- You are receiving this mail because: -------
You are the assignee for the bug.

---------------------------------------------------------------------
To unsubscribe, e-mail: bugs-unsubscribe@httpd.apache.org
For additional commands, e-mail: bugs-help@httpd.apache.org


DO NOT REPLY [Bug 46375] SetHandler documentation doesn't correspond to real behaviour.

Posted by bu...@apache.org.
https://issues.apache.org/bugzilla/show_bug.cgi?id=46375





--- Comment #3 from Eric Covener <co...@gmail.com>  2008-12-10 08:24:58 PST ---
> However, why do I have to specify the "SetHandler None" in a <Files *.php>
> container, to make it work?
> 
> I would expect that a SetHandler None in <Directory> would simply remove all
> handlers.
> 
> Is that a misconception?
> 

Yes, because you used a high priority (IOW merged later) container to set the
"first" handler:

The order of merging is:

   1. <Directory> (except regular expressions) and .htaccess done
simultaneously (with .htaccess, if allowed, overriding <Directory>)
   2. <DirectoryMatch> (and <Directory ~>)
   3. <Files> and <FilesMatch> done simultaneously
   4. <Location> and <LocationMatch> done simultaneously


-- 
Configure bugmail: https://issues.apache.org/bugzilla/userprefs.cgi?tab=email
------- You are receiving this mail because: -------
You are the assignee for the bug.

---------------------------------------------------------------------
To unsubscribe, e-mail: bugs-unsubscribe@httpd.apache.org
For additional commands, e-mail: bugs-help@httpd.apache.org