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: 2017-10-23 01:03 UTC
Votes:7
Avg. Score:4.3 ± 1.2
Reproduced:3 of 5 (60.0%)
Same Version:2 (66.7%)
Same OS:2 (66.7%)
From: davey at its-explosive dot net Assigned:
Status: Analyzed Package: PHP options/info functions
PHP Version: * OS: *
Private report: No CVE-ID: None
Have you experienced this issue?
Rate the importance of this bug to you:

 [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

Add a Patch

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
 
PHP Copyright © 2001-2017 The PHP Group
All rights reserved.
Last updated: Sun Nov 19 01:31:42 2017 UTC