Req #20377 [PATCH]: php_admin_value affects _only_ .htaccess

From: Date: Fri, 31 May 2019 12:57:48 +0000
Subject: Req #20377 [PATCH]: php_admin_value affects _only_ .htaccess
References: 1  Groups: php.bugs 
Request: Send a blank email to php-bugs+get-221060@lists.php.net to get a copy of this message
Edit report at https://bugs.php.net/bug.php?id=20377&edit=1

 ID:                 20377
 Patch added by:     house@gmail.com
 Reported by:        davey at its-explosive dot net
 Summary:            php_admin_value affects _only_ .htaccess
 Status:             Analyzed
 Type:               Feature/Change Request
 Package:            PHP options/info functions
 Operating System:   *
 PHP Version:        *
 Block user comment: N
 Private report:     N

 New Comment:

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


Previous Comments:
------------------------------------------------------------------------
[2002-11-16 00:57:29] 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();
?>



------------------------------------------------------------------------
[2002-11-15 22:23:43] davey at its-explosive dot net

/me points to php_admin_flag and php_admin_value

- Davey

------------------------------------------------------------------------
[2002-11-15 21:25:35] 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-11 20:15:05] 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

------------------------------------------------------------------------



--
Edit this bug report at https://bugs.php.net/bug.php?id=20377&edit=1


Thread (14 messages)

« previous php.bugs (#221060) next »