php.net |  support |  documentation |  report a bug |  advanced search |  search howto |  statistics |  random bug |  login
Request #34325 fastcgi htaccess scanning
Submitted: 2005-09-01 11:50 UTC Modified: 2005-10-02 15:15 UTC
Votes:1
Avg. Score:5.0 ± 0.0
Reproduced:1 of 1 (100.0%)
Same Version:1 (100.0%)
Same OS:1 (100.0%)
From: bart dot vanbrabant at zoeloelip dot be Assigned:
Status: Not a bug Package: Feature/Change Request
PHP Version: 5.0.4 OS: Linux
Private report: No CVE-ID: None
 [2005-09-01 11:50 UTC] bart dot vanbrabant at zoeloelip dot be
Description:
------------
This patch [1] adds support to the php fast-cgi interface to scan .htaccess files. All directories from the document root to the directory where the script is located will be scanned for an .htaccess file, if that file contains php_value or php_flag then these values will be parsed.

This patch can be changed a bit, it will change all config values it finds. If each directory contains the same directive it will be altered each time. It could be improved by storing them first in a hashtable but it that has an overhead too. I think the current implementation will give the best performance.

You can set the environmental variable PHP_SCAN_HTACCESS to 1 or ?on? now to enable it.

It can handle \n, \r or \r\n at the end of a line.

[1] http://files.zoeloelip.be/fast-cgi.diff


Patches

Pull Requests

History

AllCommentsChangesGit/SVN commitsRelated reports
 [2005-10-02 15:15 UTC] simp@php.net
Thank you for taking the time to write to us, but this is not
a bug. Please double-check the documentation available at
http://www.php.net/manual/ and the instructions on how to report
a bug at http://bugs.php.net/how-to-report.php

Parsing webserver configuration files is the job of the server software, not PHP.
 
PHP Copyright © 2001-2025 The PHP Group
All rights reserved.
Last updated: Wed Jul 23 22:00:03 2025 UTC