Re: 403 not working -- apache 2 / php5 / linux

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



Jason Morehouse wrote:
I still don't really get why apache hands parsing off to php when it knows it doesn't have read access to the file, but I'll save that for another list!

It could check, I suppose, but it doesn't always know that just because it can't access the file the receiver won't be able to. For example, mod_suexec can run something to handle the request as a different user id, so Apache wouldn't have any clue whether or not the destination handler is able to read the file or not.


Other times Apache hands something off to PHP which may not be treated as a file at all by PHP. For example, you might have an auto_prepend script that looks at the filename itself and uses that to do something without actually trying to access the file.

A quick little Apache module that runs in the filename translation hook or perhaps the auth hook would solve this particular problem for you. Shouldn't be more than a 5-liner but it isn't something Apache can do by default without potentially breaking many things out there.

-Rasmus

--
PHP General Mailing List (http://www.php.net/)
To unsubscribe, visit: http://www.php.net/unsub.php


[Index of Archives]     [PHP Home]     [Apache Users]     [PHP on Windows]     [Kernel Newbies]     [PHP Install]     [PHP Classes]     [Pear]     [Postgresql]     [Postgresql PHP]     [PHP on Windows]     [PHP Database Programming]     [PHP SOAP]

  Powered by Linux