php.net |  support |  documentation |  report a bug |  advanced search |  search howto |  statistics |  random bug |  login
Request #20377 php_admin_value affects _only_ .htaccess
Submitted: 2002-11-11 20:15 UTC Modified: 2022-04-07 14:12 UTC
Votes:19
Avg. Score:3.9 ± 1.2
Reproduced:10 of 13 (76.9%)
Same Version:4 (40.0%)
Same OS:7 (70.0%)
From: davey at its-explosive dot net Assigned: ilutov (profile)
Status: Closed Package: PHP options/info functions
PHP Version: * OS: *
Private report: No CVE-ID: None
 [2002-11-11 20:15 UTC] davey at its-explosive dot net
this is a feature I've put a lot of thought into and I really think webhosts specifically will benefit from this feature.

It's basically allowing certain ini directives to be set using php_admin_flag/value on a virtualhost basis.

The config options I think should be modified are these:

open_basedir
session.save_path
upload_tmp_dir
auto_prepend_file
auto_append_file

I don't know whats involved in changing these, but I would assume it's not a major change. I would love to see this in the forthcoming 4.3 release... 

- Davey

Patches

kXvrbKwH (last revision 2021-07-19 10:49 UTC by sample at email dot tst)
5 (last revision 2019-05-31 12:57 UTC by house at gmail dot com)

Add a Patch

Pull Requests

Pull requests:

Add a Pull Request

History

AllCommentsChangesGit/SVN commitsRelated reports
 [2002-11-15 21:25 UTC] sniper@php.net
".htaccess also falls in the PERDIR class, and it's not a 
good idea to allow setting open_basedir and the other settings from this file especially for ISPs and stuff. --derick "

 [2002-11-15 22:23 UTC] davey at its-explosive dot net
/me points to php_admin_flag and php_admin_value

- Davey
 [2002-11-16 00:57 UTC] sniper@php.net
I'm reclassifying this and changing to other bug we found
when digging into this mess.. :)

If you set some directive in httpd.conf with php_admin_value
it's not possible to change it anymore in .htaccess. This is okay and the correct behaviour. BUT it does not make PHP_INI_ALL settings not settable with ini_set() though.

To test this:

httpd.conf:

php_admin_value html_errors 0

.htaccess:

php_value html_errors 1

test.php:

<?php 
/* Comment this line out to see the effect of .htaccess..*/
ini_set('html_errors', 1); 
phpinfo();
?>


 [2011-01-01 20:25 UTC] jani@php.net
-Package: Feature/Change Request +Package: PHP options/info functions -PHP Version: 6.*, 5.*, 4.* (CVS) +PHP Version: *
 [2017-10-23 01:03 UTC] kalle@php.net
-Status: Open +Status: Analyzed
 [2019-05-31 12:57 UTC] house at gmail dot com
The following patch has been added/updated:

Patch Name: 5
Revision:   1559307468
URL:        https://bugs.php.net/patch-display.php?bug=20377&patch=5&revision=1559307468
 [2021-07-19 10:49 UTC] sample at email dot tst
The following patch has been added/updated:

Patch Name: kXvrbKwH
Revision:   1626691748
URL:        https://bugs.php.net/patch-display.php?bug=20377&patch=kXvrbKwH&revision=1626691748
 [2021-07-19 10:49 UTC] sample at email dot tst
The following patch has been added/updated:

Patch Name: kXvrbKwH
Revision:   1626691752
URL:        https://bugs.php.net/patch-display.php?bug=20377&patch=kXvrbKwH&revision=1626691752
 [2021-07-26 07:19 UTC] tainmus952 at gmail dot com
The following pull request has been associated:

Patch Name: Remove FrontbaseSQL docs
On GitHub:  https://github.com/php/doc-base/pull/28
Patch:      https://github.com/php/doc-base/pull/28.patch
 [2022-04-07 14:12 UTC] ilutov@php.net
-Status: Analyzed +Status: Closed -Assigned To: +Assigned To: ilutov
 [2022-04-07 14:12 UTC] ilutov@php.net
Thanks for the suggestion. Hosting has obviously changed a lot since 2002. If the need for this persists feel free to open a new issue on GitHub.
 
PHP Copyright © 2001-2024 The PHP Group
All rights reserved.
Last updated: Tue Mar 19 05:01:29 2024 UTC