Add fatal errors for magic_quotes_runtime and magic_quotes_sybase php config settings.
authorBrion Vibber <brion@users.mediawiki.org>
Sun, 20 Mar 2005 09:02:27 +0000 (09:02 +0000)
committerBrion Vibber <brion@users.mediawiki.org>
Sun, 20 Mar 2005 09:02:27 +0000 (09:02 +0000)
Tone down the safe mode warning a bit, as we no longer have the temp file issue as bad

config/index.php

index 9902381..8e38a7f 100644 (file)
@@ -206,13 +206,33 @@ if( ini_get( "safe_mode" ) ) {
        ?>
        <li class='error'><b>Warning: PHP's
        <a href='http://www.php.net/features.safe-mode'>safe mode</a> is active!</b>
-       You will likely have problems caused by this. You may need to make the
-       'images' subdirectory writable or specify a TMP environment variable pointing to
-       a writable temporary directory owned by you, since safe mode breaks the system
-       temporary directory.</li>
+       You may have problems caused by this, particularly if using image uploads.
+       </li>
        <?php
 }
 
+$fatal = false;
+
+if( ini_get( "magic_quotes_runtime" ) ) {
+       $fatal = true;
+       ?><li class='error'><b>Fatal: <a href='http://www.php.net/manual/en/ref.info.php#ini.magic-quotes-runtime'>magic_quotes_runtime</a> is active!</b>
+       This option corrupts data input unpredictably; you cannot install or use
+       MediaWiki unless this option is disabled.
+       <?php
+}
+
+if( ini_get( "magic_quotes_sybase" ) ) {
+       $fatal = true;
+       ?><li class='error'><b>Fatal: <a href='http://www.php.net/manual/en/ref.sybase.php#ini.magic-quotes-sybase'>magic_quotes_sybase</a> is active!</b>
+       This option corrupts data input unpredictably; you cannot install or use
+       MediaWiki unless this option is disabled.
+       <?php
+}
+
+if( $fatal ) {
+       dieout( "</ul><p>Cannot install wiki.</p>" );
+}
+
 $sapi = php_sapi_name();
 $conf->prettyURLs = true;
 print "<li>PHP server API is $sapi; ";