Index: .htaccess
===================================================================
RCS file: /cvs/drupal/drupal/.htaccess,v
retrieving revision 1.96
diff -u -8 -p -r1.96 .htaccess
--- .htaccess	15 Sep 2008 15:21:44 -0000	1.96
+++ .htaccess	15 Sep 2008 18:58:03 -0000
@@ -19,18 +19,19 @@ ErrorDocument 404 /index.php
 # Force simple error message for requests for non-existent favicon.ico.
 <Files favicon.ico>
   ErrorDocument 404 "The requested file favicon.ico was not found.
 </Files>
 
 # Set the default handler.
 DirectoryIndex index.php
 
-# Override PHP settings. More in sites/default/settings.php
-# but the following cannot be changed at runtime.
+# Override PHP settings that cannot be changed at runtime. See
+# sites/default/default.settings.php and _drupal_bootstrap() in
+# includes/bootstrap.inc for settings that can be changed at runtime.
 
 # PHP 5, Apache 1 and 2.
 <IfModule mod_php5.c>
   php_flag magic_quotes_gpc                 off
   php_flag register_globals                 off
   php_flag session.auto_start               off
   php_value mbstring.http_input             pass
   php_value mbstring.http_output            pass
Index: includes/bootstrap.inc
===================================================================
RCS file: /cvs/drupal/drupal/includes/bootstrap.inc,v
retrieving revision 1.224
diff -u -8 -p -r1.224 bootstrap.inc
--- includes/bootstrap.inc	8 Sep 2008 21:24:30 -0000	1.224
+++ includes/bootstrap.inc	15 Sep 2008 18:58:04 -0000
@@ -986,16 +986,21 @@ function drupal_get_bootstrap_phase() {
 }
 
 function _drupal_bootstrap($phase) {
   global $conf;
 
   switch ($phase) {
 
     case DRUPAL_BOOTSTRAP_CONFIGURATION:
+      // Override PHP settings required for Drupal to work properly. The
+      // .htaccess file contains settings that cannot be changed at runtime.
+      // See sites/default/default.settings.php for more non-runtime settings.
+      ini_set('magic_quotes_runtime', '0');
+
       drupal_initialize_variables();
       // Start a page timer:
       timer_start('page');
       // Initialize the configuration
       conf_init();
       break;
 
     case DRUPAL_BOOTSTRAP_EARLY_PAGE_CACHE:
Index: sites/default/default.settings.php
===================================================================
RCS file: /cvs/drupal/drupal/sites/default/default.settings.php,v
retrieving revision 1.14
diff -u -8 -p -r1.14 default.settings.php
--- sites/default/default.settings.php	21 Aug 2008 19:36:39 -0000	1.14
+++ sites/default/default.settings.php	15 Sep 2008 18:58:04 -0000
@@ -195,23 +195,22 @@ $update_free_access = FALSE;
  */
 # $base_url = 'http://www.example.com';  // NO trailing slash!
 
 /**
  * PHP settings:
  *
  * To see what PHP settings are possible, including whether they can
  * be set at runtime (ie., when ini_set() occurs), read the PHP
- * documentation at http://www.php.net/manual/en/ini.php#ini.list
- * and take a look at the .htaccess file to see which non-runtime
- * settings are used there. Settings defined here should not be
- * duplicated there so as to avoid conflict issues.
+ * documentation: http://www.php.net/manual/en/ini.php#ini.list
+ * See _drupal_bootstrap() in includes/bootstrap.inc for required runtime
+ * settings and the .htaccess file for non-runtime settings. Settings defined
+ * there should not be duplicated here so as to avoid conflict issues.
  */
 ini_set('arg_separator.output',     '&amp;');
-ini_set('magic_quotes_runtime',     0);
 ini_set('magic_quotes_sybase',      0);
 ini_set('session.cache_expire',     200000);
 ini_set('session.cache_limiter',    'none');
 ini_set('session.cookie_lifetime',  2000000);
 ini_set('session.gc_maxlifetime',   200000);
 ini_set('session.save_handler',     'user');
 ini_set('session.use_only_cookies', 1);
 ini_set('session.use_trans_sid',    0);
