예제 #1
0
    /**
     * This is the main output method.  The look and feel mimics phpinfo()
     *
     */
    function renderOutput()
    {
        /**
         * We need to use PhpSecInfo_Test::getBooleanIniValue() below
         * @see PhpSecInfo_Test::getBooleanIniValue()
         */
        require_once dirname(__FILE__) . DIRECTORY_SEPARATOR . 'Test' . DIRECTORY_SEPARATOR . 'Test.php';
        ?>
<div class="center">
<table border="0" cellpadding="3" width="600">
<tr class="h"><td>
<h1 class="p">
<?php 
        if (PhpSecInfo_Test::getBooleanIniValue('expose_php')) {
            ?>
<a href="http://www.php.net/"><img border="0" src="<?php 
            echo '?=' . php_logo_guid();
            ?>
" alt="PHP Logo" /></a>
<?php 
        }
        ?>
PHP Environment Security Info
</h1>
<h2 class="p">Version <?php 
        echo PHPSECINFO_VERSION;
        ?>
; build <?php 
        echo PHPSECINFO_BUILD;
        ?>
</h2>
</td></tr>
</table>
<br />
        <?php 
        foreach ($this->test_results as $group_name => $group_results) {
            $this->_outputRenderTable($group_name, $group_results);
        }
        $this->_outputRenderNotRunTable();
        $this->_outputRenderStatsTable();
        ?>

</div>
        <?php 
    }
function sysinfO()
{
    global $windows, $disablefunctions, $cwd, $safemode;
    $t8 = "<td width='25%' bgcolor='#808080'>";
    $t6 = "<td width='25%' bgcolor='#666666'>";
    $mil = "<a target='_blank' href='http://www.milw0rm.org/related.php?program=";
    $basedir = ini_get('open_basedir') || strtoupper(ini_get('open_basedir')) == 'ON' ? 'ON' : 'OFF';
    if (!empty($_SERVER['PROCESSOR_IDENTIFIER'])) {
        $CPU = $_SERVER['PROCESSOR_IDENTIFIER'];
    }
    $osver = $tsize = $fsize = '';
    if ($windows) {
        $osver = '  (' . shelL('ver') . ')';
        $sysroot = shelL("echo %systemroot%");
        if (empty($sysroot)) {
            $sysroot = $_SERVER['SystemRoot'];
        }
        if (empty($sysroot)) {
            $sysroot = getenv('windir');
        }
        if (empty($sysroot)) {
            $sysroot = 'Not Found';
        }
        if (empty($CPU)) {
            $CPU = shelL("echo %PROCESSOR_IDENTIFIER%");
        }
        for ($i = 66; $i <= 90; $i++) {
            $drive = chr($i) . ':\\';
            if (is_dir($drive)) {
                $fsize += disk_free_space($drive);
                $tsize += disk_total_space($drive);
            }
        }
    } else {
        $fsize = disk_free_space('/');
        $tsize = disk_total_space('/');
    }
    $disksize = 'Used spase: ' . showsizE($tsize - $fsize) . ' Free space: ' . showsizE($fsize) . ' Total space: ' . showsizE($tsize);
    if (empty($CPU)) {
        $CPU = 'Unknow';
    }
    $os = php_uname();
    $osn = php_uname('s');
    if (!$windows) {
        $ker = php_uname('r');
        $o = $osn == 'Linux' ? 'Linux+Kernel' : $osn;
        $os = str_replace($osn, "{$mil}{$o}'>{$osn}</a>", $os);
        $os = str_replace($ker, "{$mil}Linux+Kernel'>{$ker}</a>", $os);
        $inpa = ':';
    } else {
        $sam = $sysroot . "\\system32\\config\\SAM";
        $inpa = ';';
        $os = str_replace($osn, "{$mil}MS+Windows'>{$osn}</a>", $os);
    }
    $software = str_replace('Apache', "{$mil}Apache'>Apache</a>", $_SERVER['SERVER_SOFTWARE']);
    echo "<table border=0 cellpadding=0 cellspacing=0 style='border-collapse: collapse' bgcolor='#333333' width='100%'><tr><td>Server information:</td></tr><tr>{$t6}Server:</td><td bgcolor='#666666'>" . $_SERVER['HTTP_HOST'];
    if (!empty($_SERVER["SERVER_ADDR"])) {
        echo "(" . $_SERVER["SERVER_ADDR"] . ")";
    }
    echo "</td></tr><tr>{$t8}Operation system:</td><td bgcolor='#808080'>{$os}{$osver}</td></tr><tr>{$t6}Web server application:</td><td bgcolor='#666666'>{$software}</td></tr><tr>{$t8}CPU:</td><td bgcolor='#808080'>{$CPU}</td></tr>{$t6}Disk status:</td><td bgcolor='#666666'>{$disksize}</td></tr><tr>{$t8}User domain:</td><td bgcolor='#808080'>";
    if (!empty($_SERVER['USERDOMAIN'])) {
        echo $_SERVER['USERDOMAIN'];
    } else {
        echo "Unknow";
    }
    echo "</td></tr><tr>{$t6}User name:</td><td bgcolor='#666666'>";
    $cuser = get_current_user();
    if (!empty($cuser)) {
        echo get_current_user();
    } else {
        echo "Unknow";
    }
    echo "</td></tr>";
    if ($windows) {
        echo "<tr>{$t8}Windows directory:</td><td bgcolor='#808080'><a href='" . hlinK("seC=fm&workingdiR={$sysroot}") . "'>{$sysroot}</a></td></tr><tr>{$t6}Sam file:</td><td bgcolor='#666666'>";
        if (is_readable($sam)) {
            echo "<a href='" . hlinK("?workingdiR={$sysroot}\\system32\\config&downloaD=sam") . "'>Readable</a>";
        } else {
            echo 'Not readable';
        }
        echo '</td></tr>';
    } else {
        echo "<tr>{$t8}Passwd file:</td><td bgcolor='#808080'>";
        if (is_readable('/etc/passwd')) {
            echo "<a href='" . hlinK("seC=edit&filE=/etc/passwd&workingdiR={$cwd}") . "'>Readable</a>";
        } else {
            echo 'Not readable';
        }
        echo "</td></tr><tr>{$t6}{$mil}cpanel'>cPanel</a>:</td><td bgcolor='#666666'>";
        $cp = '/usr/local/cpanel/version';
        $cv = file_exists($cp) && is_writable($cp) ? trim(file_get_contents($cp)) : 'Unknow';
        echo "{$cv} (Log file: ";
        if (file_exists('/var/cpanel/accounting.log')) {
            if (is_readable('/var/cpanel/accounting.log')) {
                echo "<a href='" . hlinK("seC=edit&filE=/var/cpanel/accounting.log&workingdiR={$cwd}") . "'>Readable</a>";
            } else {
                echo 'Not readable';
            }
        } else {
            echo 'Not found';
        }
        echo ')</td></tr>';
    }
    echo "<tr>{$t8}{$mil}PHP'>PHP</a> version:</td><td bgcolor='#808080'><a href='?=" . php_logo_guid() . "' target='_blank'>" . PHP_VERSION . "</a> (<a href='" . hlinK("seC=phpinfo&workingdiR={$cwd}") . "'>more...</a>)</td></tr><tr>{$t6}Zend version:</td><td bgcolor='#666666'>";
    if (function_exists('zend_version')) {
        echo "<a href='?=" . zend_logo_guid() . "' target='_blank'>" . zend_version() . '</a>';
    } else {
        echo 'Not Found';
    }
    echo "</td><tr>{$t8}Include path:</td><td bgcolor='#808080'>" . str_replace($inpa, ' ', DEFAULT_INCLUDE_PATH) . "</td><tr>{$t6}PHP Modules:</td><td bgcolor='#666666'>";
    $ext = get_loaded_extensions();
    foreach ($ext as $v) {
        echo $v . ' ';
    }
    echo "</td><tr>{$t8}Disabled functions:</td><td bgcolor='#808080'>";
    if (!empty($disablefunctions)) {
        echo $disablefunctions;
    } else {
        echo 'Nothing';
    }
    echo "</td></tr><tr>{$t6}Safe mode:</td><td bgcolor='#666666'>{$safemode}</td></tr><tr>{$t8}Open base dir:</td><td bgcolor='#808080'>{$basedir}</td></tr><tr>{$t6}DBMS:</td><td bgcolor='#666666'>";
    $sq = '';
    if (function_exists('mysql_connect')) {
        $sq = "{$mil}MySQL'>MySQL</a> ";
    }
    if (function_exists('mssql_connect')) {
        $sq .= " {$mil}MSSQL'>MSSQL</a> ";
    }
    if (function_exists('ora_logon')) {
        $sq .= " {$mil}Oracle'>Oracle</a> ";
    }
    if (function_exists('sqlite_open')) {
        $sq .= ' SQLite ';
    }
    if (function_exists('pg_connect')) {
        $sq .= " {$mil}PostgreSQL'>PostgreSQL</a> ";
    }
    if (function_exists('msql_connect')) {
        $sq .= ' mSQL ';
    }
    if (function_exists('mysqli_connect')) {
        $sq .= ' MySQLi ';
    }
    if (function_exists('ovrimos_connect')) {
        $sq .= ' Ovrimos SQL ';
    }
    if ($sq == '') {
        $sq = 'Nothing';
    }
    echo "{$sq}</td></tr>";
    if (function_exists('curl_init')) {
        echo "<tr>{$t8}cURL support:</td><td bgcolor='#808080'>Enabled ";
    }
    if (function_exists('curl_version')) {
        $ver = curl_version();
        echo '(Version:' . $ver['version'] . ' OpenSSL version:' . $ver['ssl_version'] . ' zlib version:' . $ver['libz_version'] . ' host:' . $ver['host'] . ')';
    }
    echo '</td></tr></table>';
}
예제 #3
0
eregi_replace();
import_request_variables();
mcrypt_generic_end();
mysql_db_query();
mysql_escape_string();
mysql_list_dbs();
mysqli_bind_param();
mysqli_bind_result();
mysqli_client_encoding();
mysqli_fetch();
mysqli_param_count();
mysqli_get_metadata();
mysqli_send_long_data();
magic_quotes_runtime();
session_register();
session_unregister();
session_is_registered();
set_magic_quotes_runtime();
set_socket_blocking();
split();
spliti();
sql_regcase();
php_logo_guid();
php_egg_logo_guid();
php_real_logo_guid();
zend_logo_guid();
datefmt_set_timezone_id();
mcrypt_ecb();
mcrypt_cbc();
mcrypt_cfb();
mcrypt_ofb();
예제 #4
0
파일: upgrade.php 프로젝트: ateliee/php_lib
 function php_real_logo_guid()
 {
     return php_logo_guid();
 }
예제 #5
0
         echo 'Not readable';
     }
     echo "</td></tr><tr><td width=\"25%\" bgcolor=\"#666666\">Cpanel log file:</td><td bgcolor=\"#666666\">";
     if (file_exists("/var/cpanel/accounting.log")) {
         if (is_readable("/var/cpanel/accounting.log")) {
             echo "<a href=\"" . hlinK("seC=edit&filE=/var/cpanel/accounting.log&workingdiR={$cwd}") . "\"><font color=#66ffff>Readable</font></a>";
         } else {
             echo "Not readable";
         }
     } else {
         echo "Not found";
     }
     echo "</td></tr>";
 }
 $uip = !empty($_SERVER['REMOTE_ADDR']) ? $_SERVER['REMOTE_ADDR'] : getenv('REMOTE_ADDR');
 echo "\r\n<tr><td width=\"25%\" >{$mil}PHP\"><font color=yellow>PHP</font></a> version:</td>\r\n<td ><a href=\"?=" . php_logo_guid() . "\" target=\"_blank\"><font color=yellow>" . PHP_VERSION . "</font></a> \r\n(<a href=\"" . $surl . "act=phpinfo\"><font color=yellow>more...</font></a>)</td></tr>\r\n<tr><td width=\"25%\" bgcolor=\"#666666\">Zend version:</td>\r\n<td bgcolor=\"#666666\">";
 if (function_exists('zend_version')) {
     echo "<a href=\"?=" . zend_logo_guid() . "\" target=\"_blank\"><font color=#66ffff>" . zend_version() . "</font></a>";
 } else {
     echo "Not Found";
 }
 echo "</td>\r\n<tr><td width=\"25%\" >Include path:</td>\r\n<td >" . str_replace($inpa, " ", DEFAULT_INCLUDE_PATH) . "</td>\r\n<tr><td width=\"25%\" bgcolor=\"#666666\">PHP Modules:</td>\r\n<td bgcolor=\"#666666\">";
 $ext = get_loaded_extensions();
 foreach ($ext as $v) {
     echo $v . " ";
 }
 echo "</td><tr><td width=\"25%\" >Disabled functions:</td><td >";
 if (!empty($disablefunctions)) {
     echo $disablefunctions;
 } else {
     echo "Nothing";
예제 #6
0
		<div align="right" >&nbsp;BSD License</div>

		<div align="left" >&nbsp;<strong>PHPmailer</strong></div>
		<div align="left" style="float:left">&nbsp;http://phpmailer.sourceforge.net/</div>
		<div align="right" >&nbsp;LGPL License</div>

</div>




<div style="padding:10px">
<h3 align="center">PHP Engine</h2>


<h4>PHP Engine version <?php 
echo phpversion();
?>
</h4>
<a href="/?=PHPB8B5F2A0-3C92-11d3-A3A9-4C7B08C10000">
<img src="/?=<?php 
echo php_logo_guid();
?>
" alt="Logo PHP" align="right" border="0"></a> <strong>Credits:</strong> <br><br>
Thies C. Arntzen, Stig Bakken, Shane Caraveo, Andi Gutmans, Rasmus Lerdorf, Sam Ruby, Sascha Schumann, Zeev Suraski, Jim Winstead, Andrei Zmievski<br><br>
</div>




</body>
예제 #7
0
<?php

require_once "header.php.inc";
?>

<h2 id="php">PHP</h2>

<h3>Versions</h3>

<table>
 <tr>
  <th>PHP version</th><td><?php 
echo phpversion();
?>
</td><td><?php 
echo '<img src="' . $_SERVER['PHP_SELF'] . '?=' . php_logo_guid() . '" alt="PHP Logo !" />';
?>
</td>
 </tr>
 <tr>
  <th>Zend engine version</th><td><?php 
echo zend_version();
?>
</td><td style="text-align:center"><?php 
echo '<img src="' . $_SERVER['PHP_SELF'] . '?=' . zend_logo_guid() . '" alt="Zend Logo !" />';
?>
</td>
 </tr>
 <tr><th>SAPI interface</th><td colspan="2"><?php 
echo php_sapi_name();
?>
예제 #8
0
<?php

# de_DE Übersetzung der nanoconfig-Seiten
# <mario@erphesfurt·de>
# translations for "Yes" / "No" variables
$D_BOOLEAN["boolean"] = array("Nein", "Ja");
$D_BOOLEAN["boolvalue"] = array("Falsch", "Richtig");
$D_BOOLEAN["boolpower"] = array("Aus", "Ein");
$D_BOOLEAN["boolstate"] = array("Deaktiviert", "Aktiviert");
#  the percent sign can now be used to
#  translate the menu entries
#
#  the @ says that description entry is the
#  very first thing to get printed on the
#  according page
#
#-- translated descriptions
$directive_descriptions["NW"] = array("%-General" => "-Allgemein", "%-Technical" => "-Technisches", "%-Access Control" => "-Zugriffskontrolle", "%-Mime Types" => "-MIME Typen", "%-Logging" => "-Logbuch", "%-CGI Setup" => "-CGI Einstellungen", "%-Security" => "-Sicherheit", "%-Miscellaneous" => "-Verschiedens", "%Modules" => "Module", "%-FileBrowser" => "-Datei-Browser", "%-Gzip Encoding" => "-Komprimierung", "%-Authentication" => "-Authentifizierung", "%Virtual Hosts" => "Virtuelle Server", "@nanoweb" => '<img src="../nanoweblogo.gif" width="200" height="60" align="right" alt="nanoweb logo" valign="top" border="1">' . "\n                      Dieses Programm dient einer schnellen Erstkonfiguration\n                      von nanoweb. In aller Regel ist es jedoch einfacher\n                      die Konfigurationsdateien von Hand zu editieren (sehr\n                      gut dokumentiert und einfache Struktur).\n                      Übrigens sind nicht alle Einstellmöglichkeiten in\n                      diese Oberfläche integriert, so daß spätestens fürs\n                      Fein-tuning ein Editor nötig ist.\n                      <br><br> Damit dieses Werkzeug die Konfigurationsdateien\n                      auch geändert abspeichern kann müssen unter\n                      Linux/UNIX zunächst die Schreibrechte gelockert werden\n                      (unter Windows nicht notwendig):<br> <TT>chmod a+rw\n                      {$T[$which]['CONFIG_FILE']}</TT><br><br>\n                      Diese Schreibrechte können nach Abschluß aller Einstellungen\n                      mit [Lock&nbsp;Config] wieder korrigiert werden.<br><br>\n                      [Save] muß auf <b>jeder</b> Seite angeklickt werden\n                      wenn Du etwas geändert hast.<br><br><input\n                      type=\"submit\" name=\"lock\" value=\"Lock Config\">\n                      <input type=\"submit\" name=\"apply\"\n                      value=\"Apply Config\">\n", "@-General" => "Der Server benötigt einen Standard-Domainnamen, den er an\n                      alle Browser zurücksenden kann, die diesen noch nicht\n                      kennen. Es reicht nicht aus sich hier einfach einen\n                      Namen auszudenken, dem Betriebssystem muß dieser auch\n                      bekannt gemacht werden, damit er tatsächlich verwendet\n                      werden kann (siehe hierzu /etc/hosts oder C:\\winnt\\hosts).", "DocumentRoot" => "Das Dokument-Wurzelverzeichnis beherbergt\n                      alle Dateien und Ordner die durch nanoweb (also als\n                      WWW-Seiten über http://) bereitgestellt werden sollen:", "DirectoryIndex" => "Sobald eine der im folgenden\n                 aufgelisteten Dateien in einem Ordner vorhanden ist, wird\n                 diese statt einer automatisch generierten Verzeichnisliste\n                 ausgeliefert (auch bekannt als »Startdatei«):", "DefaultContentType" => "Wenn nanoweb den Typ einer Datei nicht\n                      feststellen kann, soll von diesem Standard-Dateityp\n                      ausgegangen werden:", "SingleProcessMode" => "Windows&trade; unterstützt kein\n                 Prozess-»forking« (wie Linux/UNIX), daher startet nanoweb dort in dem\n                 etwas langsameren ", "ServerMode" => "Bitte unbedingt einen Blick in die READMEs\n                 werfen, vor Änderung des ", "User" => "Da nanoweb nicht mit den Privilegien des SuperUsers\n                 laufen sollte, bitte das voreingestellte »www-data« belassen.", "ListenInterface" => "nanoweb muß zumindest eine IP Schnittstelle und einen\n                      TCP Port (80 ist Standard für Webserver) überwachen,\n                      um Verbindungen annehmen zu können.", "ListenQueue" => "Eine Zahl von ankommenden Anfragen kann\n                 auf eine Abarbeitungsliste gesetzt werden (wenn der Server\n                 gerade beschäftigt ist), ", "KeepAlive" => "Moderne Browser können mehrere Dateien mit\n                 nur einem geöffneten TCP/IP Kanal abrufen. Wenn Du keine\n                 Unterstützung dafür möchtest, setzt Du einfach den folgenden Wert auf 0:", "RequestTimeout" => "Einige Anfragen von Browsern werden nicht\n                 ordnungsgemäß beendet (Netzstörungen, Absturz), so daß\n                 Verbindungen offen bleiben. Damit ordnungsgemäße Anfragen\n                 durch diese Fälle nicht behindert werden sollte eine\n                 maximale Wartezeit zur Vervollständigung von Anfragen\n                 festgelegt werden:", "ChildLifeTime" => "Von Zeit zu Zeit können Kind-Prozesse\n                 hängen bleiben (Endlosschleifen, etc.), so daß alle\n                 Serverprozesse nach einer bestimmten Zeitspanne\n                 neugestartet werden sollten.", "MaxServers" => "Begrenzt die Anzahl maximal gestarteter Server (Kindprozesse).", "StaticBufferSize" => "mod_static lädt gewöhnliche Dateien bis zu einer\n                 maximalen Größe in den Speicher, um die Übertragung zu beschleunigen:", "TempDir" => "Ordner für temporäre Dateien:", "@-.nwaccess" => "Die Dateinamen für die Verzeichnis-spezifischen\n                      Konfigurationsdateien sind frei einstellbar:", "AuthFile" => "Diese Dateien enthalten die Authentifizierungs-Daten\n                      (Paßwörter) für den HTTP Auth. Mechanismus:", "ACPolicy" => "Nanoweb gewährt standardmäßig allen anfragenden\n                      Rechnern Zugriff; für Intranet-webserver bietet es sich hingegen an zunächst\n                      alle eingehenden Anfragen abzuwürgen.", "ACAllowIP" => "Rechner die Zugriff auf den Datenbestand erhalten\n                      sollen können mit Hostnamen oder IP Adresse angegeben werdeb, wobei\n                      Platzhalter-zeichen erlaubt sind.", "ACDenyIP" => "Wenn ACPolicy mit 'allow' allen Rechnern Zugriff\n                      erlaubt, können hier einige angegeben werden, für\n                      die diese allgemeine Erlaubnis nicht zutrifft.", "ACBlockError" => "Für abgeblockte Rechner kann hier eine nette\n                      Fehlermeldung angegeben werden:", "AccessFile" => "Um die Verzeichnis-config-dateien\n                      vom »apache« weiter zu verwenden, könntest Du den\n                      Namen für eben diese Dateien einfach in »<b>.htaccess</b>« ändern:", "AccessPolicy" => "Standardmäßig überschreiben Einstellungen in\n                      .nwaccess Dateien die ursprünglichen Konfigurationswerte\n                      des Servers. Dieses Verhalten läßt sich aber anpassen:", "AccessOverride" => "Für einzelne Direktiven kann \n                      eine abweichende Vorgehensweise konfiguriert werden.", "MimeTypes" => "nanoweb holt sich die MIME-Typ\n             Zuordnungen (Dateiendung =&gt; Typ) aus der entsprechenden\n             Konfigurationsdatei deines Systems (in jeder aktuellen\n             Linux Distribution enthalten), so daß Du dich darum eigentlich\n             nicht sorgen solltest.  \n             (MIME steht übrigens für »Mehrzweck Internet Mail Erweiterungen«)", "@-Logging" => "nanoweb unterstützt verschiedene Methoden alle Aktivitäten\n                      zu vermerken (engl. logging). Ein Erweiterungsmodul\n                      ermöglicht es z.B. die Vermerke in eine MySQL Datenbank\n                      zu schreiben.", "Log" => "Jeder virtuelle Server (und damit auch der Hauptserver)\n                 kann ein eigenes Logbuch mit allen Zugriffen speichern.", "ServerLog" => "Nanowebs Logbuch Meldungen sind in Klassen\n                 unterteilt. Der zweite Parameter zu dem Dateinamen eines\n                 ServerLogbuches bestimmt diese und filtert damit die\n                 Nachrichten. Eine Liste der möglichen Fehlertypen findet\n                 sich im Handbuch.", "HostnameLookups" => "Die DNS-Namensauflösung (Domainnamen statt\n                 IP-Nummern) verlangsamt den Server:", "HostnameLookupsBy" => "Der Host-Name kann auch erst während der\n                 Erstellung des Logbuchs herausgesucht werden, so daß sich\n                 der Server nicht damit aufhalten muß; hierzu »logger«\n                 wählen:", "PidFile" => "Die Pid-Datei enthält die »Prozeß id« auf Linux/UNIX\n                 Maschienen, was es nanoctl erleichtert den Server zu beenden.", "LoggerProcess" => "LoggerProcess, LoggerUser/Group können nur in der\n                 Konfigurationsdatei gesetzt werden.", "LogHitsToConsole" => "Wenn Du das Log auf der Standard-Ausgabe\n                  - also der Konsole (oder Fenster) sehen möchtest, muß das\n                Modul\n                <A HREF=\"" . $T["NW"]["DOC"] . "/mod_stdlog.html\">mod_stdlog</A>.\n                geladen werden.", "ParseExt" => "Die ParseExt Direktive definiert welcher CGI\n                      Interpreter bei welcher Dateinamenserweiterung\n                      verwendet werden soll.", "AllowPathInfo" => "»pathinfo« ist ein zusätzlicher Informationsträger\n                  neben dem »query string« (GET) oder den POST Variablen.\n                  Er wird oft gegenüber den GET Variablen bevorzugt, weil\n                  URLs wie \"script.php?a=x&b=1&cd=234\" nahezu alle\n                  Suchmaschinen verschrecken.", "PathInfoTryExt" => "Sehr warscheinlich möchtest Du jede\n                      CGI Erweiterung hier auch auflisten, um die\n                      Erweiterung später auslassen zu können wenn Du ein\n                      CGI in einer HTML-Datei referenzierst (also /script/\n                      statt /script.php/):", "CGIScriptsDir" => "Dateien die in einem dieser Ordner (/cgi-bin/)\n                   das Ausführbar-Flag gesetzt haben werden unabhängig von\n                   ihrer Dateiendung als CGIs behandelt. Wenn hier aber\n                   schlicht <b>/</b> eingetragen wird, dürfen diese CGIs\n                   überall vorkommen.", "CGIScriptNoExec" => "Falls eines der Scripte aus /cgi-bin/\n                   das »Ausführbar«-Flag nicht gesetzt hat, kann nanoweb eine\n                   Fehlermeldung an den Client zurücksenden (error), oder das\n                   Script wie eine gewöhnliche Datei ausliefern (raw).", "CGIFilterPathInfo" => "Der PHP Interpreter hat immer noch einen\n                     Fehler, der die \$PHP_SELF Variable bei einer vorhanden\n                     \$PATH_INFO Variable unbrauchbar macht.\n                     Wenn diese Direktiven aktiviert werden, wird also kein\n                     PATH_INFO übertragen, bleiben sie unaktiviert kann\n                     immernoch SCRIPT_NAME an stelle von PHP_SELF verwendet\n                     werden:", "ConfigDir" => "Das Verzeichnis, daß alle Konfigurations- und\n                  Themendateien von Nanoweb enthält:", "AllowSymlinkTo" => "Webserver sollten nur Zugang zu Dateien erlauben\n                  die innerhalb des Dokument-Wurzelverzeichnisses\n                  liegen. Falls jedoch Dateien außerhalb dieses\n                  Bereiches verlinkt werden (nur »symlinks« unter Linux/UNIX,\n                  Windows-Verweise sind Bastelkram), sind diese nur\n                  zugänglich wenn das Zielverzeichnis mit folgender\n                  Direktive freigeschaltet wird:", "IgnoreDotFiles" => "Dateien deren Namen mit einem Punkt\n                  beginnen werden von vielen UNIX-Programmen als\n                  unsichtbar behandlet; nanoweb's Verzeichnis-config-Dateien\n                  fallen z.B. in diese Kategorie. Daher möchtest Du\n                  normalerweise nicht, daß diese Dateien übertragen\n                  werden können:", "Alias" => "Mit der Alias Direktive können beliebigen\n                  Ordnern von der Festplatte virtuelle Verzeichnisnamen\n                  innerhalb von nanoweb zugeordnet werden.\n                  Diese virtuellen Verzeichnisse können auch in jedem der\n                  virtuellen Server verwendet werden, unabhängig von\n                  sonstigen Einstellungen:", "ServerSignature" => "Nanoweb gibt anfragenden Browsern\n                  normalerweise einige Details über sich im 'Server:'-Feld\n                  einer jeden HTTP-Antwort preis. Der Umfang der Infos\n                  kann jedoch begrenzt werden; aus Sicherheitsgründen könnte\n                  sogar eine völlig falsche Angabe (fake) gemacht werden.", "ErrorDocument" => "Für jeden auftretenden Fehler kann\n                  eine individuelle Fehlerseite angezeigt werden (an Stelle\n                  der Standard-Meldungen von nanoweb):", "AddHeader" => "Diese Direktive erlaubt das Mitsenden von\n                  beliebigen HTTP Kopfzeilen:", "UserDir" => "Private Webseiten eines System-Benutzers werden via\n                  <b>http://server/~user</b> zugänglich, wenn der\n                  entsprechende Benutzer folgendes Unterverzeichnis in seinem\n                  Heimatverzeichnis anlegt:", "@Modules" => "Folgende Erweiterungs-module werden momentan beim\n                 Starten in den Server geladen. Hinweis: Einträge die\n                 in der Konfigurationsdatei auskommentiert sind können momentan noch nicht von\n                 nanoconfig angezeigt werden.\n                 Ein Blick in das Handbuch verrät\n                 <a href=\"{$T["NW"]["DOCDIR"]}/modules.html\">welche Module</a>\n                 derzeit für nanoweb verfügbar sind.", "GzipEnable" => "Nahezu alle modernen Browser unterstützen das\n                      Standard-Komprimierungsverfahren »gzip« (auch\n                      bekannt als »zlib Format«). Die Verwendung von gzip\n                      beschleunigt die Übertragung (der Zeitaufwand die\n                      Seiten zu Komprimieren ist sehr gering) weil zum einen\n                      weniger TCP/IP-Pakete verloren gehen können weil\n                      weniger davon übertragen werden müssen, und zum\n                      anderen bechleunigt diese komprimierte Übertragung das\n                      Herunterladen über die immernoch häufig verwendeten\n                      Modems.", "GzipMaxRatio" => "Die Dateien sollten nur komprimiert übertragen\n                     werden, falls diese nicht schon komprimiert sein sollten:", "FileBrowser" => "Das Erweiterungsmodul »FileBrowser« generiert die\n                      Verzeichnislistings für nanoweb, wenn keine\n                      »Start-Datei« (index.html) in einem Ordner vorgefunden\n                      wird. Die Ausgabe kann vielfältig verschönert werden:", "FBIconDirectory" => "Das /icons/ Verzeichnis ist eines der\n                  voreingestellten Alias-Verzeichnisse, und ermöglicht damit\n                  einen einfachen Zugriff auf die Bildchen die\n                  jedem Dateityp zugeordnet werden können:", "MispellAction" => "Dieses Modul korrigiert falsch\n                 eingegebene URLs; wahlweise kann ein Hinweis (<b>advice</b>) auf die \n                 richtige Addresse ausgegeben werden, oder eine automatische\n                 Weiterleitung (<b>redirect</b>) erfolgen:", "@-MultiViews" => "Das Multiviews-Modul (TCN) erweitert nanoweb um automatische\n                      Inhalts-selektion (d.h. die richtige Datei aus einer\n                      Menge von vorhandenen Varianten an Hand der vom\n                      Browser unterstützten oder gewünschten Dateitypen\n                      und Lieblingssprachen des Benutzers auszuwählen).\n                       Unterstützt teilweise RVSA/1.0", "LanguagePriority" => "Die primär verwendeten Sprachen auf ihrem Server:", "OtherPriority" => "Zusätzliche Server-seitige Präferenzen, die verwendet\n                        werden, wenn der Browser keine Angaben über\n                        unterstützte Dateitypen macht.", "ReflectRewriting" => "Diese Direktive beeinflußt auch mod_rewrite:", "@-Status" => "mod_status erlaubt es einige <a\n                 href=\"/server-status?detailed\">Informationen über\n                 den laufenden Server</a> online einzusehen.\n                 Im <a href=\"{$T["NW"]["DOC"]}\">Handbuch</a> findet sich\n                 eine Beschreibung über die vorhanden Info-Seiten.", "StatusAllowHost" => "Aus Sicherheitsgründen solltest Du nur lokalen\n                 Rechnern Zugang zu den Status-Seiten gewähren.\n                 Unvollständige IP-Angaben werden als Vergleichsmuster\n                 ausgewertet:", "@-StdoutLog" => "Das Modul mod_stdlog gibt das Logbuch auf die\n                      Konsole aus. Das funktioniert natürlich nur, wenn\n                      nanoweb.php direkt (ohne nanoctl) von dort gestartet\n                      wurde.", "@-MySQL Logging" => "mod_mysqllog schreibt das Server-Logbuch in eine\n                 Datenbank (nanoweb benutzt ansonsten eine ganz gewöhnliche\n                 Datei dafür).\n                 Die entsprechende Tabelle wird beim ersten Start\n                 automatisch erstellt, wenn alle Einstellungen\n                 richtig sind:", "@Virtual Hosts" => "Ein »virtual host« (oder »virtueller Server«)\n                      besitzt einen Domain-namen und ein Wurzelverzeichnis,\n                      die sich von dem des Hauptservers unterscheiden.\n                      Viele der Direktiven die in der Hauptkonfiguration\n                      verwendet werden können, sind auch hier erlaubt.<br><br>" . 'DNS-Name für den neuen virtuellen Server:<input size="42" name="add_vhost"> <input type="submit" value="Add" name="save"><br> ');
#-- PHP Dokumentation
$T["PHP"]["DOC"] = "http://www.php.net/manual/de/";
$T["PHP"]["DOCREF"] = "http://www.php.net/manual/de/configuration.php#ini.";
#-- added [sections]
$configuration_pages_add_section["NW"] = array("html" => "Direktiven für einen »virtuellen Server« dürfen\n                    von den Einstellungen des Hauptservers abweichen. ", "html_2" => "Ohne einen seperaten Verzeichnisbaum für dessen\n                    Dateien, wäre ein virtueller Server absolut blödsinnig:<br><br>", "DocumentRoot" => "string", "html_3" => "Vergleichsmuster für zusätzliche Domain-Namen,<br>", "ServerAlias" => "multiple", "html_4" => "Wenn Du ein eigenständiges Logbuch für diesen\n                    virtuellen Server möchtest, dann trage bitte hier den\n                    entsprechenden Dateinamen ein.<br>", "Log" => "string");
$configuration_pages_add_section["PHP"] = array("html_seedoc" => "Bitte wirf' einen Blick in das\n               <a href=\"{$T[$which]["DOC"]}\">Handbuch</a> für\n               Informationen zu folgenden Konfigurations&shy;einstellungen.<br><br>");
#-- PHP-Seiten
$directive_descriptions["PHP"] = array("@PHP" => "<nobr><b>P</b>HP</nobr> <nobr><b>H</b>ypertext</nobr>\n                      <nobr><b>P</b>rocessor</nobr> <img src=\"{$PHP_SELF}?=" . php_logo_guid() . "\" align=\"right\" alt=\"PHP Logo\">\n                      Es war ursprünglich nicht geplant PHP auch mit\n                      nanoconfig einstellen zu können (wenngleich beide\n                      Konfigurationsdateien einen ähnlichen Aufbau haben);\n                      also bitte keine Wunder erwarten!\n                      <br><br>\n                      Natürlich muß auch die <b>php.ini</b> wieder für dieses\n                      Tool beschreibbar gemacht werden (nicht nötig für Windows,\n                      weil es dort ja keinen Schreibschutz gibt):<br>\n                      <tt>chmod a+rw php.ini</tt>", "engine" => "PHP kann in den einzelnen Unterverzeichnissen\n                      aktiviert und deaktiviert werden;", "expose_php" => "Wegen Sicherheitsbedenken möchten einige\n                      Leute nicht verraten, daß PHP benutzt wird...\n                      Diese Option zu setzen, macht natürlich nur Sinn,\n                      wenn man nicht anhand der Dateinamen ohnehin ablesen kann,\n                      daß PHP verwendet wird (mit ParseExt oder mod_rewrite,\n                      mod_multiviews könnte man dies jedoch verschleiern).", "short_open_tag" => "PHP-code wird in das XML-Tag\n                      <nobr><tt><b>&lt;?php ... ?&gt;</b></tt></nobr>\n                      eingeschlossen, normalerweise möchte man aber auch\n                      die Kurzform (ohne das »php« nach dem Fragezeichen) verwenden\n                      <tt>&lt;?...?&gt;</tt> ", "asp_tags" => "ASP-ähnliche Tags werden eher selten verwendet <tt>&lt;%...%&gt;</tt> ", "include_path" => "Eine Liste mit Ordnern in denen nach\n                  include() Dateien gesucht werden soll (Ordner mit\n                  Doppelpunkten trennen; bzw. Semikolon unter Windows)", "auto_prepend_file" => "Die folgenden Dateien sollen automatisch am\n                  Anfang und am Ende jedes PHP-Scriptes eingefügt werden\n                  (nützlich um allgemeine Server-spezifische Laufzeit-Einstellungen\n                  vorzunehmen).", "allow_url_fopen" => "PHP erlaubt es mit den normalen Datei-\n                  Ein-/Ausgabefunktionen auch auf entfernte Dateien \n                  mit http:// and ftp:// (lesend) zuzugreifen. Sehr nützlich,\n                  aber u.U. ein Sicherheitsloch bei schlecht durchdachten\n                  Scripten.", "doc_root" => "Die folgenden Einstellungen dienen hauptsächlich\n                  der Kompatibilität. Wer nanoweb verwendet, sollte sich\n                  hierum nicht kümmern müssen.", "@-Variables" => "PHP war ursprünglich als die einfachste und für die\n                  Webentwicklung schnellste Scriptsprache ersonnen worden,\n                  allerdings wurden aus Sicherheitsgründen einige Änderungen\n                  im Verhalten der Sprache eingeführt. Mit folgenden Optionen\n                  kann jedoch die Kompatibilität mit früheren Versionen\n                  wieder hergestellt werden:", "register_globals" => "Wenn Du alle GET, POST und COOKIE Variablen\n                  automatisch im globalen Namensraum verfügbar haben möchtest\n                  (andernfalls sind die Variablen über \$_REQUEST[] oder \$_GET[]\n                  erreichbar), solltest Du folgende Option aktivieren,", "varialbes_order" => "Vorzugsreihenfolge für Get-, Post-, Cookie-,\n                  Session- und Umgebungs-variablen:", "register_argc_argv" => "\$argc und \$argv sind eigenlich nur in\n                  eigenständigen (nicht-www) Scripten nützlich (CLI):", "precision" => "Gleitkommagenauigkeit", "magic_quotes_gpc" => "Atkivierte »magic quotes« führen dazu,\n                  daß Meta-Zeichen (Anführungszeichen, Backslash) in allen\n                  Variablen, die von \"außen\" kommen oder die nach außen wandern,\n                  automatisch geschützt werden (durch vorangestellten Backslash):", "@-Output" => "Alle Ausgaben (also alle nicht-PHP-Bereiche oder\n                  echo()-Aufrufe) können zwischengespeichert (gepuffert)\n                  werden und/oder durch eine spezielle Bearbeitungsfkt.\n                  gesendet werden.", "output_buffering" => "Du kannst die Puffergröße zur\n                  Ausgabeverzögerung selber festlegen (»On« steht für 4096 Byte).\n                  Ein solcher Zwischenspeicher erlaubt es u.a. weitere\n                  header() zu senden obwohl bereits Ausgaben gemacht wurden.", "zlib.output_compression" => "An Stelle einer der allgemeinen\n                  Ausgaberoutinen (das Feld hierüber) kann auch die oft\n                  bevorzugte komprimierte Übertragung der HTML-Seite\n                  aktiviert werden:", "implicit_flush" => "Wenn ein Ausgabebehandler aktiviert ist,\n                  soll der Puffer automatisch nach jeden echo()\n                  geleert werden?", "safe_mode" => "Der »Sichere Modus« von PHP erlaubt es die\n                  Verfügbarkeit von bestimmten Systemfunktionen zu beschränken\n                  und auch den Zugriff auf nicht-eigene Dateien zu verhindern.", "safe_mode_gid" => "Neben dem Eigentümer soll beim Zugriff auf eine\n                  Datei auch die Gruppenzugehörigkeit überprüft werden\n                  (GID - »group id« unter Linux/UNIX).", "safe_mode_include_dir" => "Eigentümer/Gruppe wird für folgende\n                  Ordner ignoriert:", "disable_functions" => "Die folgende Einstellung funktioniert\n                  unabhängig von »Safe Mode«:", "enable_dl" => "Die dl() Funktion erlaubt es Erweiterungsmodule\n                  noch während der Laufzeit nachzuladen:", "@-Errors/Log" => "Fehlermeldungen werden unterdrückt oder umgeleitet\n                 abhängig von folgenden Einstellungen:", "error_reporting" => "Dieser Wert kann später auch in jedem Script\n                 mit error_reporting() übergangen werden. Einige Fehler\n                 treten jedoch bereits beim Laden auf (z.B. Parser-Fehler),\n                 und werden daher immer angezeigt, wenn sie hier nicht\n                 deaktiviert sind.\n                 E_ALL, E_ERROR, E_WARNING, E_PARSE, E_NOTICE,\n                 E_COMPILE_ERROR, E_CORE_ERROR sind nur einige der Optionen\n                 die hier mit | oder + kombiniert werden können:", "display_errors" => "Die Fehlermeldungen gleich in die\n                 erstellten Seiten mitauszugeben ist sehr hilfreich bei der Entwicklung,\n                 aber nicht empfohlen auf fertigen Internetpräsenzen:", "html_errors" => "Fehler mit HTML Auszeichnungen hervorheben\n                 (in aller Regel roter Text, was aber in der php.ini\n                 eingestellt werden kann).", "error_log" => "Fehler-Logbuch soll ins »<b>syslog</b>«\n                 (gibt es auch unter NT, nicht jedoch im Windows) oder in\n                 die hier angegebene Datei geschrieben werden:", "memory_limit" => "Der Ausführung von Scripten können im Speicherverbrauch\n                 und der benötigten Ausführungszeit Grenzen gesetzt werden.", "post_max_size" => "Zu große POST Anfragen können den Server zum\n                  Absturz bringen, und führen relativ häufig zu einer\n                  erheblichen Verlangsamung der Ausführung.", "from" => "Anonyme FTP Übertragungen erfordern die Angabe\n                 einer EMail-Adresse an Stelle eines Paßwortes:", "y2k_compliance" => "(nicht wirklich nützlich) ", "extension" => "Viele der PHP Erweiterungen sind inzwischen direkt in den\n                 Interpreter einkompiliert, so daß nur noch einige wenige expilizit geladen\n                 werden müssen.");
예제 #9
0
<center><b><font size="5">aEGiS PHP nano web demo server</font></b></center>
<br><br>
<hr style="height:1px;" width="95%" color="#00CCCC">
<br><br><br>
<table width="95%" align="center"><tr><td>
<font face="Verdana" size="2">
<table width="95%" cellspacing="0" cellpadding="0" align="center">
<tr><td align="left"><font size="2" valign="top">
<br><br><br>

<center>
This page is served to you by aEGiS nanoweb<br>
<br>

<?php 
echo "<img src=\"" . $PHP_SELF . "?=" . php_logo_guid() . "\"border=\"0\" alt=\"PHP Logo\">";
?>

</center>

<br><br><br>


<center>
this is an example of simple dynamic content generated by php and served by nanoweb<br><br>

user agent<br>
<b>

<?php 
echo getenv("HTTP_USER_AGENT");
예제 #10
0
<?php

# help text for all configuration directives in English
# this file is the fallback and thus always required!
$directive_descriptions["NW"] = array("@nanoweb" => '<img src="../nanoweblogo.gif" width="200" height="60" align="right" alt="nanoweb logo" valign="top" border="1"> ' . "This tool is intended for quick initial setup of nanoweb.\n                      It is often much easier and faster to edit the\n                      well documented configuration files and it is in\n                      fact impossible to configure each and every option\n                      through this interface, so an editor is necessary for\n                      fine-tuning.\n                      <br><br> In order to be able to use this tool you must\n                      make the config files writeable on Linux/UNIX\n                      machines (not Windows):<br><TT>chmod a+rw\n                      {$T[$which]['CONFIG_FILE']}</TT><br><br>This can be revoked by\n                      pushing 'Lock Config' on this page after you have\n                      finished setup.<br><br>You need to select [Save] on\n                      every page if you did changes to it.<br><br><input\n                      type=\"submit\" name=\"lock\" value=\"Lock Config\">\n                      <input type=\"submit\" name=\"apply\"\n                      value=\"Apply Config\">\n", "@-General" => "The main server needs a default DNS name which gets\n                      send back if a client doesn't know it yet. An alias\n                      name may contain asterisks. You cannot just invent\n                      names here without telling your operating system (see\n                      /etc/hosts or C:\\winnt\\hosts).", "@-.nwaccess" => "The name of the per-directory\n                      configuration files is not hardcoded, it's up to your\n                      choice how they are called.", "@-Logging" => "nanoweb supports various ways to log nearly all\n                      activities. If you want to enable logging to a MySQL\n                      database, please refer to the manual on how to setup\n                      the according extension module.", "@Modules" => "Following extension modules are currently set to be\n                      loaded on nanoweb startup. Note that entries, which\n                      are commented out, don't get shown here (yet).\n                      Have a look in the manual for an overview of all\n                      <a href=\"{$T["NW"]["DOCDIR"]}/modules.html\">available\n                      modules</a>.", "@-Authentication" => 'There are currently 6 different authentication
                      modules available for nanoweb, which can be activated
                      with the <A HREF="' . $T["NW"]["DOCREF"] . '#authrequire">AuthRequire</A>
                      directive.', "@-Multiviews" => "The multiviews module extends nanoweb with\n                      transparent content negotiation (this means serving\n                      a file out of a bunch of variants that best matches\n                      the clients preferences).<br>It partially helps with\n                      RVSA/1.0.", "@-Status" => "mod_status allows you to view some <a\n                 href=\"/server-status?detailed\">informations about\n                 the running server</a> online.<br>\n                 Please refer to the <a href=\"{$T["NW"]["DOC"]}\">manual</a> for\n                 the available info pages.", "@-StdoutLog" => "The module mod_stdlog prints the log to the console\n                      nanoweb.php was run from. This only works if you\n                      didn't used nanoctl to start the server.", "@-MySQL Logging" => "mod_mysqllog writes the server log into a database\n                 (instead of to some file, which the standard logging\n                 functions do).<br>\n                 The according table is automagically created if everything\n                 is set up correctly:", "@-Proxy" => "mod_proxy is an internal proxy for nanoweb. Proxy\n                 servers are often used to be able to overcross a firewall,\n                 the nanoweb proxy is primarily a caching one.", "@-LoadLimit" => "mod_load_limit stops nanoweb from further serving pages\n                      if the server gets too slow.", "@-Brainfuck" => "Brainfuck server pages (.bsp) module.<br>\n                          Please refer to the manual, READMEs and Google for\n                          further informations.", "@-DoS Evasive" => "This module prevents your server from going down\n                      due to »Denial of Service« attacks.", "@Virtual Hosts" => "A »virtual host« always has a server name and a docroot\n                      different from the main server. Many of the directives\n                      that can be used within the main server configuration\n                      section are allowed for virtual hosts too.<br><br>" . 'DNS name for the new virtual host:<br><input size="42" name="add_vhost"> <input type="submit" value="Add" name="save"> ', "DocumentRoot" => "The document root is the base directory of\n                      all files which are available (via http://) through\n                      the nanoweb server:", "DirectoryIndex" => "The file that gets delivered in favour\n                 of a directory listing can be set using the DirectoryIndex\n                 directive. Multiple file names may be given here separated\n                 by spaces:", "DefaultContentType" => "When nanoweb cannot determine which\n                 type a file is of, it will use following value to tell\n                 the client (browser):", "SingleProcessMode" => "Because Windows&trade; doesn't\n                 support process forking like UNIX, nanoweb must run on this\n                 platform in the somewhat slower ", "ServerMode" => "You're strongly encouraged to have a look into\n                 the READMEs before changing the ", "User" => "If you don't want nanoweb to run with superuser\n                        privileges keep the default »www-data« as ", "ListenInterface" => "nanoweb needs to bind to at least one IP address\n                      and a TCP port (80 is the default for webservers) to\n                      listen for incoming connections.", "ListenQueue" => "A number of incoming requests can be\n                 delayed (until they are processed) depending on the size\n                 of the ", "KeepAlive" => "Modern HTTP clients can request different\n                 files without opening that much TCP/IP connections. This\n                 feature can be disabled by setting this directive to 0:", "RequestTimeout" => "Some browsers crash from time to time and\n                 thus cannot complete their requests after they already\n                 established and prepared a connection. To prevent\n                 nanoweb from waiting neverendless for unfinished requests\n                 this directive sets a timeout for these cases:", "ChildLifeTime" => "From time to time child processes need to\n                 be restarted because they may already be trapped in some\n                 neverending loop. Give an amount of seconds after which\n                 every child shall be recreated.", "MaxServers" => "Limits the number of child servers Nanoweb may create.", "TempDir" => "Set this to where nanoweb is allowed to saves some files temporarily:", "StaticBufferSize" => "mod_static handles all plain files, but loads\n                 big files into memory for faster output until following limit:", "ACPolicy" => "Nanoweb per default accepts requests from any\n                 host, but it can also be configured to allow only a few\n                 ones to access the server content.", "ACAllowIP" => "Hosts that should be granted access regardless\n                 of the default setting above may be given with names or IP numbers\n                 containing wildcards.", "ACDenyIP" => "If ACPolicy defaults to 'allow', you can\n                 still prevent some hosts from accessing your server:", "ACBlockError" => "You can customize the error response for blocked hosts.", "AccessFile" => "If you want to reuse the per-directory\n                      configuration files of apache for example you may\n                      want to change this to »<b>.htaccess</b>«:", "AccessPolicy" => "Per default config settings of per-directory\n                      configuration files override the values from the main server configuration;\n                      but this behaviour can be changed:", "AccessOverride" => "You can set the desired behaviour for\n                      individual directives independently from the default\n                      configuration settings overriding policy.", "MimeTypes" => "nanoweb initially fetches it's mime\n             types from the system wide mime registry file found on all\n             recent Linux systems, so there's actually no need to care about\n             file extension mappings.", "DisableMimeMagic" => "If a files mime type cannot be determined by\n             its extension nanoweb will let PHP (CVS or version 4.3 or later)\n             guess the mime type by using the 'magic data' file. If you fear\n             this is too slow (usually not the case) you could disable this.", "ServerLog" => "Nanoweb can create multiple ServerLogs. The second\n                 argument to the filename tells which message class should\n                 be written to the specified log. See the manual for a list\n                 of server message types.", "Log" => "Every virtual host (and so the main server) can log the\n                 access hits to a separate file.", "LogDir" => "Set a default directory for log files, so you can\n                 shorten the file path within the Log and ServerLog directives.", "HostnameLookups" => "You may want to keep the DNS lookups\n                 (for hostnames instead of IP addresses in server logs)\n                 disabled, as this slows down nanoweb a bit:", "HostnameLookupsBy" => "The actual lookup can be delayed, as\n                 the DNS query is only required for the server logs; select\n                 »logger« to speed up the main server / delivery:", "PidFile" => "The PidFile holds the »process id« on Linux/UNIX\n                 machines, which eases killing the server for nanoctl.", "LoggerProcess" => "LoggerProcess, LoggerUser/Group can only be set\n                        in the config file.", "LogHitsToConsole" => "If you want the log to be printed to the\n                 console (window) the module\n                <A HREF=\"" . $T["NW"]["DOC"] . "/mod_stdlog.html\">mod_stdlog</A>\n                must be loaded.", "ParseExt" => "The ParseExt directive\n                      defines which CGI interpreter shall be invoked for\n                      which file extension.", "AllowPathInfo" => "The pathinfo is an additional information holder\n                  besides the query string (GET) or the POST variables.\n                  It is often used in favour of GET variables\n                  because urls like \"script.php?a=x&b=1&cd=234\" frighten nearly\n                  all search engines, while the pathinfo is harmless.", "PathInfoTryExt" => "You probably want to note every CGI\n                      extension in here too, as this enables you to leave\n                      out extensions when referring to a CGI with an incomplete\n                      URI and without the need for mod_multiviews:", "CGIScriptsDir" => "Files in a (/cgi-bin/) directory specified here\n                   are treaten as CGIs if they have the executeable flag\n                   set (without dependency on file extension). If you just\n                   set this to <b>/</b> your exec-flag CGIs may be located\n                   anywhere.", "CGIScriptNoExec" => "If one of the scripts in your /cgi-bin/\n                   has the executable flag not set, the server should\n                   normally send an error response to the requesing client\n                   (error), but may otherwise deliver this one as ordinary\n                   file (raw).", "CGIFilterPathInfo" => "The PHP interpreter still has a bug, which\n                     makes it trash the \$PHP_SELF variable if one\n                     passes a \$PATH_INFO. If this directive is enabled\n                     you won't be able to use PATH_INFO, if disabled you\n                     still can use SCRIPT_NAME in favour of PHP_SELF:", "ConfigDir" => "Specify the directory where all the configuration\n                  files of nanoweb and the theme files are kept:", "AllowSymlinkTo" => "Webservers only should allow access to files\n                  below the docroot (or the docroot of a virtual hosts). You\n                  may however allow nanoweb to serve files if you list the\n                  symlinks destination directory here:", "IgnoreDotFiles" => "Files whose name starts with a dot are\n                  treaten invisible by most UNIX applications; nanoweb for\n                  example keeps per-directory configuration and password data\n                  in files of this kind. You probably don't want anybody to\n                  be able to retrieve such files:", "Alias" => "Use the Alias directive to assign virtual\n                  directory names to absolute paths. These aliased directories\n                  can be accessed from any virtual host independent from\n                  any following configuration directives:", "ErrorDocument" => "A custom info page may be shown\n                  instead of nanoweb's built-in error messages:", "AddHeader" => "This directive allows you to send arbitrary\n                  HTTP headers to the client:", "UserDir" => "User directories are accessible via\n                  <b>http://server/~user</b> if the user created following\n                  subdirectory in his homedir.", "ServerSignature" => "You can control how much information\n                  about your server Nanoweb reports to clients, you could even report your\n                  server software with a faked free form string (useful for security reasons).", "Include" => "The Include directive allows to split the configuration\n                      into different files; <tt>nanoweb.conf</tt>,\n                      <tt>modules.conf</tt> and <tt>vhosts.conf</tt> are the\n                      default ones, and you probably don't want much more\n                      of these!", "ModulesDir" => "You don't need of course to give full path\n                      names for every module, if you specified a default\n                         directory for them:", "GzipEnable" => "Nearly all HTTP transfers can be accelerated if the\n                      requested content is encoded using the internet\n                      standard compression method »gzip« (also known as\n                      »zlib format«) as all recent browsers support\n                      transparent compression. This speeds up the transfer\n                      as there is usually less packet loss due to usually\n                      less tcp/ip packages, and most important: many users\n                      still use slow modem dialup connections.", "GzipLevel" => "You can force the compression library to spend\n                      more time on getting better results with a value of 9,\n                      but of course as speed is often more important, you\n                      should set this to some smaller value (5 is default):", "GzipMaxRatio" => "Only transfer compressed if it doesn't seems to be\n                     already compressed:", "FileBrowser" => "The filebrowser extension module generates directory\n                      listings where no default file (see DirectoryIndex)\n                      is available. The output may be tweaked by various\n                      options:", "FBIconDirectory" => "The /icons/ directory is an aliased one which can be reached from every vhost,\n                  that way it is much easier for mod_filebrowser to map icons to file types:", "AuthSimpleUserPass" => "mod_auth_<b>simple</b> allows\n                      you to specify all usernames and passwords within one\n                      of the configuration files with just this\n                      directive (enter login and password seperated with a\n                      space here):<br>", "AuthNwauthFilename" => "mod_auth_<b>nwauth</b> keeps\n                      the login/password pairs in the nanoweb authentication\n                      files:<br>", "AuthHtpasswdFilename" => "mod_auth_<b>htpasswd</b> allows\n                      you to use apache style authentication files:<br>", "AuthMysqlHost" => "with mod_auth_<b>mysql</b>\n                      you can use login/password pairs from an already\n                      existing MySQL user database:<br>", "AuthMysqlTable" => "Give here the table and column names that\n                      contain the user authentication records; and specify\n                      how the password field was encoded:<br>", "AuthPgsqlHost" => "with mod_auth_<b>pgsql</b>\n                      you can use login/password pairs from an already\n                      existing PostgreSQL database:<br>", "AuthLDAPServer" => "mod_auth_<b>ldap</b> fetches authentication\n                      data via LDAP:<br>", "MispellAction" => "Correct misspelled URLs automagically (internal\n                 redirect) or present an error page with correct URL:", "LanguagePriority" => "You may want to set the language that is the primary\n                        one on your web page:", "OtherPriority" => "Additional server-side preferences come into use,\n                        when the client is unwillingly to state which \n                        file types it supports:", "ReflectRewriting" => "Following directive is also used by mod_rewrite:", "StatusAllowHost" => "For security reasons you only should allow\n                 local users access to these status pages. An incomplete\n                 IP address is treaten as match pattern:", "ProxyCacheDir" => "Cache directory which will be filled with\n                 all requested files:", "ProxyAllowIP" => "Only specified hosts (or ranges when\n                 incomplete IP given here) are allowed to access other\n                 servers using the proxy:", "ProxyAccesLog" => "A seperate server log,", "ProxyDenySite" => "Sites which shall not be available\n                 through the server must be listed in this text file (one\n                 server name per line):", "LoadLimitErrorMessage" => "You can define a custom error message for\n                      blocked requests,", "LoadLimitAction" => "Nanoweb can block requests or redirect clients\n                      to 'fallback server' when the load limit is reached.", "LoadLimitRedirect" => "fallback server ");
$directive_descriptions["PHP"] = array("@PHP" => "The <nobr><b>P</b>HP</nobr> <nobr><b>H</b>ypertext</nobr>\n                      <nobr><b>P</b>rocessor</nobr>.<img src=\"{$PHP_SELF}?=" . php_logo_guid() . "\" align=\"right\" alt=\"PHP Logo\"><br>  It wasn't originally\n                      planned to make PHP configurable with nanoconfig, so\n                      don't expect any miracles!<br><br>You have to make the\n                      php.ini writeable as you did with the nanoweb\n                      configuration files (<tt>chmod a+rw php.ini</tt>) to\n                      be able to adjust the directives.", "engine" => "PHP can be enabled or disabled on a per\n                      directory basis, that's what this flag is for:", "expose_php" => "For security concerns some people don't\n                      want to tell the world that they're actually using PHP.\n                      Setting this flag only makes sense if none of the\n                      scripts is referred with the default trailing .php (add\n                      a ParseExt or use mod_rewrite to hide it effectively):", "short_open_tag" => "PHP code is enclosed in the XML-style\n                      <nobr><tt><b>&lt;?php ... ?&gt;</b></tt></nobr> tag, but most\n                      people want to leave out the »php« after the question\n                      mark<br><tt>&lt;?...?&gt;</tt> ", "asp_tags" => " ASP tags are rather unusual<br><tt>&lt;%...%&gt;</tt> ", "include_path" => "Give a list of colon separated directories\n                  to search for included files:", "auto_prepend_file" => "Following files are automagically included\n                  into every executed script (useful for setup of site\n                  specific runtime defaults):", "allow_url_fopen" => "PHP allows you to use the standard file access\n                   function calls to retrieve http:// and ftp:// resources\n                   (reading only). This is a very powerful feature, but can\n                   lead easily to security holes.", "doc_root" => "The following directives are compatibility ones.\n                  Just don't care if you use nanoweb.", "@-Variables" => "PHP once was known to be an ease to web development.\n                  For security reasons some of its behaviour has changed\n                  through the last versions. You can however gain\n                  compatibility with older versions with some of these\n                  options:", "register_globals" => "If you want all GET, POST and COOKIE variables\n                  to be automagically accessible in global name space\n                  (else these variables are accessible through\n                  \$_REQUEST[] or \$_GET[]), you probably want to enable ", "variables_order" => "Precedence order for Get, Post, Cookie,\n                  Session and Environment variables:", "register_argc_argv" => "\$argc and \$argv are only useful to\n                  standalone non-www scripts (CLI):", "precision" => "length of floating point variables", "magic_quotes_gpc" => "Enabling »magic quotes« will lead to\n                  escaped meta characters in variables that come from\n                  outside or are to be send out:", "@-Output" => "Every piece of output that comes from non-script\n                  areas or echo() may be buffered or feed through output\n                  handlers.", "output_buffering" => "You may set a buffer size (default for »on« is\n                  4096 bytes) which allows you to send headers() even if\n                  something already has been printed out.", "zlib.output_compression" => "Instead of specifying one of the generic\n                  output handlers above you may want to auto compress your\n                  pages with the »zlib« output handler (this is what\n                  mod_gzip does for static pages):", "implicit_flush" => "If a output handler is active, flush the buffer after every\n                  echo() and non-php-script page part?", "safe_mode" => "The PHP »Safe Mode« allows to restrict availability\n                  of functions or access to not owned files and directories.", "safe_mode_gid" => "Check script's GID (»group id« on Linux/UNIX) also\n                  against accessed file, additionally to the standard UID\n                  (»user id«) test.", "safe_mode_include_dir" => "The uid/gid doesn't need to match for following\n                  two directories:", "disable_functions" => "This directive is also in effect, when safe\n                  mode is not enabled:", "enable_dl" => "The dl() function allows to load binary extension modules\n                  at runtime:", "@-Errors/Log" => "Errors may be suppressed or redirected determined by\n                 following config directives,", "error_reporting" => "Following value may be changed in each script by\n                 using the error_reporting() function call; however some\n                 errors are produced in load stage (parsing errors for\n                 example) and thus cannot be affected later.\n                 E_ALL, E_ERROR, E_WARNING, E_PARSE, E_NOTICE,\n                 E_COMPILE_ERROR, E_CORE_ERROR are only some of the available\n                 bits which may be combined with the »binary OR«: |", "display_errors" => "Mixing error messages into standard output\n                 (web page) is very handy for development but discouraged for\n                 production web sites:", "html_errors" => "Display errors using HTML markup (red color for example).\n                 You may want to set the error output enhancements in the php.ini\n                 after enabling this:", "error_log" => "Log errors to »<b>syslog</b>« (also available for\n                 NT but not in Windows 4.x) or to the file specified here:", "@-CGI" => "These are some legacy options to tweak behaviour of the\n                 CGI version of the PHP interpreter.", "cgi.force_redirect" => "Should really be disabled for Nanoweb:", "cgi.fix_pathinfo" => "If enabled PHP garbages the\n                 \$_SERVER[\"PATH_INFO\"] and some other CGI vars. Used for\n                 some stupid security reasons with Apache, and should be\n                 disabled here.", "cgi.rfc2616_headers" => "Apache does not use the CGI/1.1\n                 specification headers corrrectly, while Nanoweb does and\n                 therefor the RFC2616 (HTTP/1.1) compliant headers\n                 should be used:", "memory_limit" => "Execution of scripts can be restricted in time\n                 and memory usage.", "post_max_size" => "Too huge POST requests may trash the server or slow\n                  down your scripts considerably, and thus are often used to\n                  fault webservers.", "file_uploads" => "HTML Forms allow to upload files with the HTTP POST method.", "from" => "Anonymous FTP connections require an email\n                 address to be send instead of a password:"******"y2k_compliance" => "not really useful ", "extension" => "Many of the PHP extensions are now built-in; however\n                  some of them must be explicitly loaded and registered within\n                  the PHP core.");
$configuration_pages_add_section["NW"] = array("html" => "Directives in a virtual host section may override\n                    values from the main server configuration.<br>", "html_2" => "Without a separate directory tree a virtual\n                    host section would be completely senseless:<br><br>", "DocumentRoot" => "string", "html_3" => "Match pattern for additional server names,<br>", "ServerAlias" => "multiple", "html_4" => "If you would like to have a separate server log for this\n                    virtual host, just give a different filename here.<br>", "Log" => "string");
$configuration_pages_add_section["PHP"] = array("html_seedoc" => "Please have a look at the\n               <a href=\"{$T[$which]["DOC"]}\">online manual</a> for\n               informations on these configuration directives.<br><br>");
예제 #11
0
function sysinfO()
{
    global $windows, $disablefunctions, $safemode;
    $cwd = getcwd();
    $mil = "<a target=\"_blank\" href=\"http://www.milw0rm.org/related.php?program=";
    $basedir = (ini_get("open_basedir") or strtoupper(ini_get("open_basedir")) == "ON") ? "ON" : "OFF";
    if (!empty($_SERVER["PROCESSOR_IDENTIFIER"])) {
        $CPU = $_SERVER["PROCESSOR_IDENTIFIER"];
    }
    $osver = $tsize = $fsize = '';
    if ($windows) {
        $osver = "  (" . shelL("ver") . ")";
        $sysroot = shelL("echo %systemroot%");
        if (empty($sysroot)) {
            $sysroot = $_SERVER["SystemRoot"];
        }
        if (empty($sysroot)) {
            $sysroot = getenv("windir");
        }
        if (empty($sysroot)) {
            $sysroot = "Not Found";
        }
        if (empty($CPU)) {
            $CPU = shelL("echo %PROCESSOR_IDENTIFIER%");
        }
        for ($i = 66; $i <= 90; $i++) {
            $drive = chr($i) . ':\\';
            if (is_dir($drive)) {
                $fsize += @disk_free_space($drive);
                $tsize += @disk_total_space($drive);
            }
        }
    } else {
        $fsize = disk_free_space('/');
        $tsize = disk_total_space('/');
    }
    $disksize = "Used spase: " . showsizE($tsize - $fsize) . "   Free space: " . showsizE($fsize) . "   Total space: " . showsizE($tsize);
    if (empty($CPU)) {
        $CPU = "Unknow";
    }
    $os = php_unamE();
    $osn = php_unamE('s');
    if (!$windows) {
        $ker = php_unamE('r');
        $o = $osn == "Linux" ? "Linux+Kernel" : $osn;
        $os = str_replace($osn, "{$mil}{$o}\">{$osn}</a>", $os);
        $os = str_replace($ker, "{$mil}Linux+Kernel\">{$ker}</a>", $os);
        $inpa = ':';
    } else {
        $sam = $sysroot . "\\system32\\config\\SAM";
        $inpa = ';';
        $os = str_replace($osn, "{$mil}MS+Windows\">{$osn}</a>", $os);
    }
    $software = str_replace("Apache", "{$mil}Apache\">Apache</a>", $_SERVER['SERVER_SOFTWARE']);
    echo "<table border=0 cellpadding=0 cellspacing=0 style=\"border-collapse: collapse\" bordercolor=\"#282828\" bgcolor=\"#333333\" width=\"100%\"><tr><td>Server information:</td></tr><tr><td width=\"25%\" bgcolor=\"#666666\">Server:</td><td bgcolor=\"#666666\">" . $_SERVER["HTTP_HOST"];
    if (!empty($_SERVER["SERVER_ADDR"])) {
        echo "(" . $_SERVER["SERVER_ADDR"] . ")";
    }
    echo "</td></tr><tr><td width=\"25%\" bgcolor=\"#808080\">Operation system:</td><td bgcolor=\"#808080\">{$os}{$osver}</td></tr><tr><td width=\"25%\" bgcolor=\"#666666\">Web server application:</td><td bgcolor=\"#666666\">{$software}</td></tr><tr><td width=\"25%\" bgcolor=\"#808080\">CPU:</td><td bgcolor=\"#808080\">{$CPU}</td></tr><td width=\"25%\" bgcolor=\"#666666\">Disk status:</td><td bgcolor=\"#666666\">{$disksize}</td></tr><tr><td width=\"25%\" bgcolor=\"#808080\">User domain:</td><td bgcolor=\"#808080\">";
    if (!empty($_SERVER['USERDOMAIN'])) {
        echo $_SERVER['USERDOMAIN'];
    } else {
        echo "Unknow";
    }
    echo "</td></tr><tr><td width=\"25%\" bgcolor=\"#666666\">User name:</td><td bgcolor=\"#666666\">";
    $cuser = get_current_user();
    if (!empty($cuser)) {
        echo get_current_user();
    } else {
        echo "Unknow";
    }
    echo "</td></tr>";
    if ($windows) {
        echo "<tr><td width=\"25%\" bgcolor=\"#808080\">Windows directory:</td><td bgcolor=\"#808080\"><a href=\"" . hlinK("seC=fm&workingdiR={$sysroot}") . "\">{$sysroot}</a></td></tr><tr><td width=\"25%\" bgcolor=\"#666666\">Sam file:</td><td bgcolor=\"#666666\">";
        if (is_readable($sam)) {
            echo "<a href=\"" . hlinK("?workingdiR={$sysroot}\\system32\\config&downloaD=sam") . "\">Readable</a>";
        } else {
            echo "Not readable";
        }
        echo "</td></tr>";
    } else {
        echo "<tr><td width=\"25%\" bgcolor=\"#808080\">Passwd file:</td><td bgcolor=\"#808080\">";
        if (is_readable('/etc/passwd')) {
            echo "<a href=\"" . hlinK("seC=edit&filE=/etc/passwd&workingdiR={$cwd}") . "\">Readable</a>";
        } else {
            echo 'Not readable';
        }
        echo "</td></tr><tr><td width=\"25%\" bgcolor=\"#666666\">Cpanel log file:</td><td bgcolor=\"#666666\">";
        if (file_exists("/var/cpanel/accounting.log")) {
            if (is_readable("/var/cpanel/accounting.log")) {
                echo "<a href=\"" . hlinK("seC=edit&filE=/var/cpanel/accounting.log&workingdiR={$cwd}") . "\">Readable</a>";
            } else {
                echo "Not readable";
            }
        } else {
            echo "Not found";
        }
        echo "</td></tr>";
    }
    $uip = !empty($_SERVER['REMOTE_ADDR']) ? $_SERVER['REMOTE_ADDR'] : getenv('REMOTE_ADDR');
    echo "<tr><td width=\"25%\" bgcolor=\"#808080\">{$mil}PHP\">PHP</a> version:</td><td bgcolor=\"#808080\"><a href=\"?=" . php_logo_guid() . "\" target=\"_blank\">" . PHP_VERSION . "</a> (<a href=\"" . hlinK("seC=phpinfo&workingdiR={$cwd}") . "\">more...</a>)</td></tr><tr><td width=\"25%\" bgcolor=\"#666666\">Zend version:</td><td bgcolor=\"#666666\">";
    if (function_exists('zend_version')) {
        echo "<a href=\"?=" . zend_logo_guid() . "\" target=\"_blank\">" . zend_version() . "</a>";
    } else {
        echo "Not Found";
    }
    echo "</td><tr><td width=\"25%\" bgcolor=\"#808080\">Include path:</td><td bgcolor=\"#808080\">" . str_replace($inpa, " ", DEFAULT_INCLUDE_PATH) . "</td><tr><td width=\"25%\" bgcolor=\"#666666\">PHP Modules:</td><td bgcolor=\"#666666\">";
    $ext = get_loaded_extensions();
    foreach ($ext as $v) {
        echo $v . " ";
    }
    echo "</td><tr><td width=\"25%\" bgcolor=\"#808080\">Disabled functions:</td><td bgcolor=\"#808080\">";
    if (!empty($disablefunctions)) {
        echo $disablefunctions;
    } else {
        echo "Nothing";
    }
    echo "</td></tr><tr><td width=\"25%\" bgcolor=\"#666666\">Safe mode:</td><td bgcolor=\"#666666\">{$safemode}</td></tr><tr><td width=\"25%\" bgcolor=\"#808080\">Open base dir:</td><td bgcolor=\"#808080\">{$basedir}</td></tr><tr><td width=\"25%\" bgcolor=\"#666666\">DBMS:</td><td bgcolor=\"#666666\">";
    $sq = "";
    if (function_exists('mysql_connect')) {
        $sq = "{$mil}MySQL\">MySQL</a> ";
    }
    if (function_exists('mssql_connect')) {
        $sq .= " {$mil}MSSQL\">MSSQL</a> ";
    }
    if (function_exists('ora_logon')) {
        $sq .= " {$mil}Oracle\">Oracle</a> ";
    }
    if (function_exists('sqlite_open')) {
        $sq .= " SQLite ";
    }
    if (function_exists('pg_connect')) {
        $sq .= " {$mil}PostgreSQL\">PostgreSQL</a> ";
    }
    if (function_exists('msql_connect')) {
        $sq .= " mSQL ";
    }
    if (function_exists('mysqli_connect')) {
        $sq .= " MySQLi ";
    }
    if (function_exists('ovrimos_connect')) {
        $sq .= " Ovrimos SQL ";
    }
    if ($sq == "") {
        $sq = "Nothing";
    }
    echo "{$sq}</td></tr>";
    if (function_exists('curl_init')) {
        echo "<tr><td width=\"25%\" bgcolor=\"#808080\">cURL support:</td><td bgcolor=\"#808080\">Enabled ";
    }
    if (function_exists('curl_version')) {
        $ver = curl_version();
        echo "(Version:" . $ver['version'] . " OpenSSL version:" . $ver['ssl_version'] . " zlib version:" . $ver['libz_version'] . " host:" . $ver['host'] . ")";
    }
    echo "</td></tr>";
    echo "<tr><td>User information:</td></tr><tr><td width=\"25%\" bgcolor=\"#666666\">IP:</td><td bgcolor=\"#666666\">{$uip}</td></tr><tr><td width=\"25%\" bgcolor=\"#808080\">Agent:</td><td bgcolor=\"#808080\">" . getenv('HTTP_USER_AGENT') . "</td></tr></table>";
}