Date: 03/31/00
- Next message: Bug Database: "[PHP-DEV] PHP 4.0 Bug #3978 Updated: checking for gdImageCreateFromPng in -lgd... no (yes in 4.0 Beta 3)"
- Previous message: Bug Database: "[PHP-DEV] PHP 4.0 Bug #3991 Updated: admin_values (like safe mode) can be overridden"
- Next in thread: Bug Database: "[PHP-DEV] PHP 4.0 Bug #3991 Updated: admin_values (like safe mode) can be overridden"
- Messages sorted by: [ date ] [ thread ] [ subject ] [ author ]
ID: 3991
User Update by: djm <email protected>
Status: Open
Bug Type: Misbehaving function
Description: admin_values (like safe mode) can be overridden
Here's a patch wtih a more user-friendly error message:
--- sapi/apache/mod_php4.c 2000/03/31 01:55:50 1.1
+++ sapi/apache/mod_php4.c 2000/03/31 07:24:01 1.2
@@ -560,6 +571,7 @@
CONST_PREFIX char *php_apache_value_handler_ex(cmd_parms *cmd, HashTable *conf, char *arg1, char *arg2, int mode)
{
php_per_dir_entry per_dir_entry;
+ php_ini_entry *ini_entry;
if (!apache_php_initialized) {
sapi_startup(&sapi_module);
@@ -574,6 +586,20 @@
per_dir_entry.key_length = strlen(arg1);
per_dir_entry.value_length = strlen(arg2);
+
+ ini_entry = get_ini_entry(arg1, per_dir_entry.key_length + 1);
+ if (ini_entry && !(ini_entry->modifyable & mode)) {
+ char msg[8192], *context;
+ if (mode == PHP_INI_SYSTEM)
+ context = "system";
+ else if (mode == PHP_INI_PERDIR)
+ context = "per-directory";
+ else
+ context = "unknown";
+ snprintf(msg, 8192, "php: not setting %s=\"%s\"; not permitted in %s configuration", arg1, arg2, context);
+ php_apache_log_message(msg);
+ return NULL;
+ }
per_dir_entry.key = (char *) malloc(per_dir_entry.key_length+1);
memcpy(per_dir_entry.key, arg1, per_dir_entry.key_length);
Full Bug description available at: http://bugs.php.net/version4/?id=3991
-- PHP Development Mailing List <http://www.php.net/> To unsubscribe, e-mail: php-dev-unsubscribe <email protected> For additional commands, e-mail: php-dev-help <email protected> To contact the list administrators, e-mail: php-list-admin <email protected>
- Next message: Bug Database: "[PHP-DEV] PHP 4.0 Bug #3978 Updated: checking for gdImageCreateFromPng in -lgd... no (yes in 4.0 Beta 3)"
- Previous message: Bug Database: "[PHP-DEV] PHP 4.0 Bug #3991 Updated: admin_values (like safe mode) can be overridden"
- Next in thread: Bug Database: "[PHP-DEV] PHP 4.0 Bug #3991 Updated: admin_values (like safe mode) can be overridden"
- Messages sorted by: [ date ] [ thread ] [ subject ] [ author ]

