Date: 09/18/99
- Next message: Bug Database: "[PHP-DEV] Bug #1612 Updated: mod_php seems does not merges per directory configuration correctly"
- Previous message: lemming <email protected>: "[PHP-DEV] PHP 4.0 Bug #2322: Memory leak"
- Messages sorted by: [ date ] [ thread ] [ subject ] [ author ]
rasmus Sat Sep 18 18:12:09 1999 EDT
Modified files:
/php3 ChangeLog mod_php3.c
Log:
I think this should finally fix the Apache .conf directive problems
related to overriding directives set at higher levels inside sub-dirs
Index: php3/ChangeLog
diff -u php3/ChangeLog:1.763 php3/ChangeLog:1.764
--- php3/ChangeLog:1.763 Fri Sep 17 04:18:37 1999
+++ php3/ChangeLog Sat Sep 18 18:12:09 1999
@@ -2,6 +2,7 @@
|||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
???? ??, 1999, Version 3.0.13
+- Fix longstanding Apache .conf nested directive problem (Rasmus)
- OCI8 fix for fetching empty LOBs (Thies)
- OCI8 supports appending and positioning when saving LOBs (Thies)
- Added Mcal support (Mark Musone)
Index: php3/mod_php3.c
diff -u php3/mod_php3.c:1.92 php3/mod_php3.c:1.93
--- php3/mod_php3.c:1.92 Sat May 22 11:27:46 1999
+++ php3/mod_php3.c Sat Sep 18 18:12:09 1999
@@ -27,7 +27,7 @@
| (with helpful hints from Dean Gaudet <dgaudet <email protected>> |
+----------------------------------------------------------------------+
*/
-/* $Id: mod_php3.c,v 1.92 1999/05/22 15:27:46 sas Exp $ */
+/* $Id: mod_php3.c,v 1.93 1999/09/18 22:12:09 rasmus Exp $ */
#ifdef THREAD_SAFE
#include "tls.h"
@@ -271,15 +271,19 @@
*/
static void *php3_create_dir(pool * p, char *dummy)
{
- php3_ini_structure *new;
+ php3_ini_structure *new;
+ static int first_time = 1;
- php3_module_startup(); /* php3_ini_master is set up here */
-
- new = (php3_ini_structure *) palloc(p, sizeof(php3_ini_structure));
- memcpy(new,&php3_ini_master,sizeof(php3_ini_structure));
-
-
- return new;
+ php3_module_startup();
+ new = (php3_ini_structure *) palloc(p, sizeof(php3_ini_structure));
+
+ if(first_time) {
+ memcpy(new,&php3_ini_master,sizeof(php3_ini_structure));
+ first_time=0;
+ } else {
+ memcpy(new,&php3_ini,sizeof(php3_ini_structure));
+ }
+ return new;
}
/*
@@ -290,53 +294,52 @@
php3_ini_structure *new = (php3_ini_structure *) palloc(p, sizeof(php3_ini_structure));
php3_ini_structure *base = (php3_ini_structure *) basev;
php3_ini_structure *add = (php3_ini_structure *) addv;
- php3_ini_structure orig = php3_ini_master;
/* Start with the base config */
memcpy(new,base,sizeof(php3_ini_structure));
/* Now, add any fields that have changed in *add compared to the master config */
- if (add->smtp != orig.smtp) new->smtp = add->smtp;
- if (add->sendmail_path != orig.sendmail_path) new->sendmail_path = add->sendmail_path;
- if (add->sendmail_from != orig.sendmail_from) new->sendmail_from = add->sendmail_from;
- if (add->errors != orig.errors) new->errors = add->errors;
- if (add->magic_quotes_gpc != orig.magic_quotes_gpc) new->magic_quotes_gpc = add->magic_quotes_gpc;
- if (add->magic_quotes_runtime != orig.magic_quotes_runtime) new->magic_quotes_runtime = add->magic_quotes_runtime;
- if (add->magic_quotes_sybase != orig.magic_quotes_sybase) new->magic_quotes_sybase = add->magic_quotes_sybase;
- if (add->track_errors != orig.track_errors) new->track_errors = add->track_errors;
- if (add->display_errors != orig.display_errors) new->display_errors = add->display_errors;
- if (add->log_errors != orig.log_errors) new->log_errors = add->log_errors;
- if (add->doc_root != orig.doc_root) new->doc_root = add->doc_root;
- if (add->user_dir != orig.user_dir) new->user_dir = add->user_dir;
- if (add->safe_mode != orig.safe_mode) new->safe_mode = add->safe_mode;
- if (add->track_vars != orig.track_vars) new->track_vars = add->track_vars;
- if (add->safe_mode_exec_dir != orig.safe_mode_exec_dir) new->safe_mode_exec_dir = add->safe_mode_exec_dir;
- if (add->cgi_ext != orig.cgi_ext) new->cgi_ext = add->cgi_ext;
- if (add->isapi_ext != orig.isapi_ext) new->isapi_ext = add->isapi_ext;
- if (add->nsapi_ext != orig.nsapi_ext) new->nsapi_ext = add->nsapi_ext;
- if (add->include_path != orig.include_path) new->include_path = add->include_path;
- if (add->auto_prepend_file != orig.auto_prepend_file) new->auto_prepend_file = add->auto_prepend_file;
- if (add->auto_append_file != orig.auto_append_file) new->auto_append_file = add->auto_append_file;
- if (add->upload_tmp_dir != orig.upload_tmp_dir) new->upload_tmp_dir = add->upload_tmp_dir;
- if (add->upload_max_filesize != orig.upload_max_filesize) new->upload_max_filesize = add->upload_max_filesize;
- if (add->extension_dir != orig.extension_dir) new->extension_dir = add->extension_dir;
- if (add->short_open_tag != orig.short_open_tag) new->short_open_tag = add->short_open_tag;
- if (add->debugger_host != orig.debugger_host) new->debugger_host = add->debugger_host;
- if (add->debugger_port != orig.debugger_port) new->debugger_port = add->debugger_port;
- if (add->error_log != orig.error_log) new->error_log = add->error_log;
+ if (add->smtp != base->smtp) new->smtp = add->smtp;
+ if (add->sendmail_path != base->sendmail_path) new->sendmail_path = add->sendmail_path;
+ if (add->sendmail_from != base->sendmail_from) new->sendmail_from = add->sendmail_from;
+ if (add->errors != base->errors) new->errors = add->errors;
+ if (add->magic_quotes_gpc != base->magic_quotes_gpc) new->magic_quotes_gpc = add->magic_quotes_gpc;
+ if (add->magic_quotes_runtime != base->magic_quotes_runtime) new->magic_quotes_runtime = add->magic_quotes_runtime;
+ if (add->magic_quotes_sybase != base->magic_quotes_sybase) new->magic_quotes_sybase = add->magic_quotes_sybase;
+ if (add->track_errors != base->track_errors) new->track_errors = add->track_errors;
+ if (add->display_errors != base->display_errors) new->display_errors = add->display_errors;
+ if (add->log_errors != base->log_errors) new->log_errors = add->log_errors;
+ if (add->doc_root != base->doc_root) new->doc_root = add->doc_root;
+ if (add->user_dir != base->user_dir) new->user_dir = add->user_dir;
+ if (add->safe_mode != base->safe_mode) new->safe_mode = add->safe_mode;
+ if (add->track_vars != base->track_vars) new->track_vars = add->track_vars;
+ if (add->safe_mode_exec_dir != base->safe_mode_exec_dir) new->safe_mode_exec_dir = add->safe_mode_exec_dir;
+ if (add->cgi_ext != base->cgi_ext) new->cgi_ext = add->cgi_ext;
+ if (add->isapi_ext != base->isapi_ext) new->isapi_ext = add->isapi_ext;
+ if (add->nsapi_ext != base->nsapi_ext) new->nsapi_ext = add->nsapi_ext;
+ if (add->include_path != base->include_path) new->include_path = add->include_path;
+ if (add->auto_prepend_file != base->auto_prepend_file) new->auto_prepend_file = add->auto_prepend_file;
+ if (add->auto_append_file != base->auto_append_file) new->auto_append_file = add->auto_append_file;
+ if (add->upload_tmp_dir != base->upload_tmp_dir) new->upload_tmp_dir = add->upload_tmp_dir;
+ if (add->upload_max_filesize != base->upload_max_filesize) new->upload_max_filesize = add->upload_max_filesize;
+ if (add->extension_dir != base->extension_dir) new->extension_dir = add->extension_dir;
+ if (add->short_open_tag != base->short_open_tag) new->short_open_tag = add->short_open_tag;
+ if (add->debugger_host != base->debugger_host) new->debugger_host = add->debugger_host;
+ if (add->debugger_port != base->debugger_port) new->debugger_port = add->debugger_port;
+ if (add->error_log != base->error_log) new->error_log = add->error_log;
/* skip the highlight stuff */
- if (add->sql_safe_mode != orig.sql_safe_mode) new->sql_safe_mode = add->sql_safe_mode;
- if (add->xbithack != orig.xbithack) new->xbithack = add->xbithack;
- if (add->engine != orig.engine) new->engine = add->engine;
- if (add->last_modified != orig.last_modified) new->last_modified = add->last_modified;
- if (add->max_execution_time != orig.max_execution_time) new->max_execution_time = add->max_execution_time;
- if (add->memory_limit != orig.memory_limit) new->memory_limit = add->memory_limit;
- if (add->browscap != orig.browscap) new->browscap = add->browscap;
- if (add->arg_separator != orig.arg_separator) new->arg_separator = add->arg_separator;
- if (add->gpc_order != orig.gpc_order) new->gpc_order = add->gpc_order;
- if (add->error_prepend_string != orig.error_prepend_string) new->error_prepend_string = add->error_prepend_string;
- if (add->error_append_string != orig.error_append_string) new->error_append_string = add->error_append_string;
- if (add->open_basedir != orig.open_basedir) {
+ if (add->sql_safe_mode != base->sql_safe_mode) new->sql_safe_mode = add->sql_safe_mode;
+ if (add->xbithack != base->xbithack) new->xbithack = add->xbithack;
+ if (add->engine != base->engine) new->engine = add->engine;
+ if (add->last_modified != base->last_modified) new->last_modified = add->last_modified;
+ if (add->max_execution_time != base->max_execution_time) new->max_execution_time = add->max_execution_time;
+ if (add->memory_limit != base->memory_limit) new->memory_limit = add->memory_limit;
+ if (add->browscap != base->browscap) new->browscap = add->browscap;
+ if (add->arg_separator != base->arg_separator) new->arg_separator = add->arg_separator;
+ if (add->gpc_order != base->gpc_order) new->gpc_order = add->gpc_order;
+ if (add->error_prepend_string != base->error_prepend_string) new->error_prepend_string = add->error_prepend_string;
+ if (add->error_append_string != base->error_append_string) new->error_append_string = add->error_append_string;
+ if (add->open_basedir != base->open_basedir) {
if (new->open_basedir == NULL) {
new->open_basedir = add->open_basedir;
} else {
@@ -347,10 +350,10 @@
#endif
}
}
- if (add->enable_dl != orig.enable_dl) new->enable_dl = add->enable_dl;
- if (add->ignore_user_abort != orig.ignore_user_abort) new->ignore_user_abort = add->ignore_user_abort;
- if (add->asp_tags != orig.asp_tags) new->asp_tags = add->asp_tags;
- if (add->dav_script != orig.dav_script) new->dav_script = add->dav_script;
+ if (add->enable_dl != base->enable_dl) new->enable_dl = add->enable_dl;
+ if (add->ignore_user_abort != base->ignore_user_abort) new->ignore_user_abort = add->ignore_user_abort;
+ if (add->asp_tags != base->asp_tags) new->asp_tags = add->asp_tags;
+ if (add->dav_script != base->dav_script) new->dav_script = add->dav_script;
return new;
}
-- 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] Bug #1612 Updated: mod_php seems does not merges per directory configuration correctly"
- Previous message: lemming <email protected>: "[PHP-DEV] PHP 4.0 Bug #2322: Memory leak"
- Messages sorted by: [ date ] [ thread ] [ subject ] [ author ]

