From: <mge...@us...> - 2006-05-09 00:46:49
|
Revision: 24 Author: mgeisler Date: 2006-05-07 15:52:30 -0700 (Sun, 07 May 2006) ViewCVS: http://svn.sourceforge.net/phpshell/?rev=24&view=rev Log Message: ----------- Added new configuration variable: safe-mode-warning. When running in Safe Mode a big warning will be displayed, unless this variable is set to false. Modified Paths: -------------- trunk/config.php trunk/phpshell.php trunk/style.css Modified: trunk/config.php =================================================================== --- trunk/config.php 2006-05-07 22:16:45 UTC (rev 23) +++ trunk/config.php 2006-05-07 22:52:30 UTC (rev 24) @@ -60,3 +60,10 @@ ; directory. home-directory = "." + +; Safe Mode warning. PHP Shell will normally display a big, fat +; warning if it detects that PHP is running in Safe Mode. If you find +; that PHP Shell works anyway, then set this to false to get rid of +; the warning. + +safe-mode-warning = true Modified: trunk/phpshell.php =================================================================== --- trunk/phpshell.php 2006-05-07 22:16:45 UTC (rev 23) +++ trunk/phpshell.php 2006-05-07 22:52:30 UTC (rev 24) @@ -126,7 +126,8 @@ /* Default settings --- these settings should always be set to * something. */ -$default_settings = array('home-directory' => '.'); +$default_settings = array('home-directory' => '.', + 'safe-mode-warning' => true); /* Merge settings. */ $ini['settings'] = array_merge($default_settings, $ini['settings']); @@ -357,6 +358,26 @@ <?php } else { /* Authenticated. */ ?> +<?php if ($ini['settings']['safe-mode-warning'] && ini_get('safe_mode')) { ?> + +<div class="warning"> + <p><b>Warning:</b> PHP is running in <a + href="http://php.net/features.safe-mode">Safe Mode</a>. This means + that PHP Shell is likely to <b>fail</b> in strange ways. See the <a + href="SECURITY">SECURITY</a> file for some background information + about Safe Mode and its effects on PHP Shell.</p> + + <p>Please note that there is nothing that PHP Shell can do to + deactivate Safe Mode. You will have to talk to your system + administrator about it.</p> + + <p>PHP Shell will try its best to carry on despite Safe Mode. You + can disable this warning by setting <code>safe-mode-warning</code> + to <code>false</code> in the configuration file.</p> +</div> + +<?php } /* Safe mode. */ ?> + <fieldset> <legend>Current Working Directory: <code><?php echo htmlspecialchars($_SESSION['cwd'], ENT_COMPAT, 'UTF-8'); Modified: trunk/style.css =================================================================== --- trunk/style.css 2006-05-07 22:16:45 UTC (rev 23) +++ trunk/style.css 2006-05-07 22:52:30 UTC (rev 24) @@ -58,3 +58,10 @@ .error { color: red; } + +div.warning { + background-color: rgb(255, 150, 150); + border: medium solid rgb(255, 60, 60); + padding: 0.5em; + margin: 0.25em; +} This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site. |