Exemplo n.º 1
0
}
/** get a module setting */
function getModuleSetting($pModuleName, $pSetting)
{
    $vModules = parsePHPModules();
    return $vModules[$pModuleName][$pSetting];
}
echo '<P CLASS="page_title_text"><img src="' . $rootpath . '/css/' . $theme . '/images/maintenance.png" TITLE="' . _('System Check') . '" ALT="">' . ' ' . _('System Check') . '</P><CENTER>';
echo '<DIV class="system_check">';
echo '<h3>PHP Settings</h3>';
echo '<p>PHP version: ' . phpversion();
echo '<p>GD Module: ' . getModuleSetting('gd', 'GD Version') . '</p>';
echo '<p>MYSQL Module: ' . getModuleSetting('mysql', 'Client API version') . '</p>';
echo '<p>MySQL character set: ' . mysql_client_encoding();
echo '<p>Zlib: ' . getModuleSetting('zlib', 'ZLib Support') . '</p>';
echo '<p>Simple XML: ' . getModuleSetting('SimpleXML', 'Revision') . '</p>';
echo '<h3>Linux System Settings</h3>';
ob_start();
echo "<p><b>Memory Free</b></br>";
passthru('free');
echo "<p><b>CPU type</b></br>";
passthru('cat /proc/cpuinfo | grep "model name" ');
echo "<p><b>Disk Space Free</b><br>";
system('df');
echo "<p><b>webERP Disk Space Usage</b><br>";
system('du -sh');
echo "<p>";
$fr = ob_get_contents();
ob_end_clean();
echo '<pre>' . $fr . '</pre>';
include 'includes/footer.inc';
Exemplo n.º 2
0
}
CMessage('PHP session support - Check 1 (recommended):', $ses_ok);
// check PHP session support 2
$good = getModuleSetting('session', 'Session Support') == 'enabled' ? 1 : 0;
$canContinue = $canContinue && $good;
CMessage('PHP session support - Check 2 (recommended): ', $good);
// check mySQL
$good = function_exists('mysql_connect') ? 1 : 0;
$canContinue = $canContinue && $good;
CMessage('MySQL support exists - Check 1: ', $good);
// check mySQL
$good = getModuleSetting('mysql', 'MySQL Support') == 'enabled' ? 1 : 0;
$canContinue = $canContinue && $good;
CMessage('MySQL support exists - Check 2: ', $good);
// GD2 Support
$good = getModuleSetting('gd', 'GD Support') == 'enabled' ? 1 : 0;
$canContinue = $canContinue && $good;
CMessage('GD2 support exists: ', $good);
// files is writable?
clearstatcache();
$canContinue = isWriteable($canContinue, '' . ROOT_PATH . 'include/config.php', 0777, '/include/config.php/');
$canContinue = isWriteable($canContinue, '' . ROOT_PATH . 'torrents/', 0777, '/torrents/');
$canContinue = isWriteable($canContinue, '' . ROOT_PATH . 'cache/', 0777, '/cache/');
$canContinue = isWriteable($canContinue, '' . ROOT_PATH . 'chat.php', 0777, 'chat.php/');
$canContinue = isWriteable($canContinue, '' . ROOT_PATH . 'addons/guest.dat', 0777, 'addons/guest.dat');
$canContinue = isWriteable($canContinue, '' . ROOT_PATH . 'badwords.txt', 0777, 'badwords.txt');
if (is_writable('' . ROOT_PATH . 'INCLUDE/CONFIG.PHP')) {
    $good = true;
    $fname = '' . ROOT_PATH . 'INCLUDE/TEST';
    if (is_writable($fname)) {
        $fp = fopen($fname, 'w');
Exemplo n.º 3
0
        echo $status;
        ?>
</b></font>
                        </td>
                        <td style="border: 1px solid #000000;">
                            "OpenSSL support" is required for OpenSRS registrar.
                        </td>
                    </tr>

                    <tr bgcolor="#EEEEEE">
                        <td align="left" style="border: 1px solid #000000;">
                            &nbsp;MHASH support
                        </td>
                        <td align="center" style="border: 1px solid #000000;">
                            <?php 
        $status = getModuleSetting("mhash", "MHASH support");
        ?>
                            <font color=<?php 
        echo strtolower($status) == "enabled" ? "green" : "orange";
        ?>
><b><?php 
        echo $status;
        ?>
</b></font>
                        </td>
                        <td style="border: 1px solid #000000;">
                            "MHASH support" is required for Authorize.net payment method.
                        </td>
                    </tr>

                    <tr>
Exemplo n.º 4
0
    }
    echo '<b><span style="color:#00cc00">ОК</span></b> (Версия ' . $pdoversion . ')<br />';
} else {
    echo '<b><span style="color:#ff0000">Ошибка</span></b> (Расширение не загружено)<br />';
    $error_critical = 1;
}
echo 'Библиотека GD: ';
if (extension_loaded('gd')) {
    echo '<b><span style="color:#00cc00">ОК</span></b> (Версия ' . getModuleSetting('gd', 'GD Version') . ')<br />';
} else {
    echo '<b><span style="color:#ff0000">Ошибка</span></b> (Библиотека не загружена)<br />';
    $error_setting++;
}
echo 'Библиотека Zlib: ';
if (extension_loaded('zlib')) {
    echo '<b><span style="color:#00cc00">ОК</span></b> (Версия ' . getModuleSetting('zlib', 'Compiled Version') . ')<br />';
} else {
    echo '<b><span style="color:#ff0000">Ошибка</span></b> (Библиотека не загружена)<br />';
    $error_setting++;
}
echo 'Safe Mode: ';
if (!ini_get('safe_mode')) {
    echo '<b><span style="color:#00cc00">ОК</span></b> (Выключено)<br />';
} else {
    echo '<b><span style="color:#ff0000">Ошибка</span></b> (Включено)<br />';
    $error_setting++;
}
echo 'Magic Quotes Runtime: ';
if (!ini_get('magic_quotes_runtime')) {
    echo '<b><span style="color:#00cc00">ОК</span></b> (Выключено)<br />';
} else {
Exemplo n.º 5
0
     $error_critical = 1;
 }
 if (extension_loaded('pdo_mysql')) {
     echo '<img src="../images/img/plus.gif" alt="image" /> Расширение PDO-MySQL: <b><span style="color:#00cc00">ОК</span></b> (Версия ' . strtok(getModuleSetting('pdo_mysql', array('Client API version', 'PDO Driver for MySQL, client library version')), '-') . ')<br />';
 } else {
     echo '<img src="../images/img/minus.gif" alt="image" /> Расширение PDO-MySQL: <b><span style="color:#ff0000">Ошибка</span></b> (Расширение не загружено)<br />';
     $error_critical = 1;
 }
 if (extension_loaded('gd')) {
     echo '<img src="../images/img/plus.gif" alt="image" /> Библиотека GD: <b><span style="color:#00cc00">ОК</span></b> (Версия ' . getModuleSetting('gd', array('GD Version', 'GD library Version', 'GD headers Version')) . ')<br />';
 } else {
     echo '<img src="../images/img/minus.gif" alt="image" /> Библиотека GD: <b><span style="color:#ffa500">Предупреждение</span></b> (Библиотека не загружена)<br />';
     $error_setting++;
 }
 if (extension_loaded('zlib')) {
     echo '<img src="../images/img/plus.gif" alt="image" /> Библиотека Zlib: <b><span style="color:#00cc00">ОК</span></b> (Версия ' . getModuleSetting('zlib', 'Compiled Version') . ')<br />';
 } else {
     echo '<img src="../images/img/minus.gif" alt="image" /> Библиотека Zlib: <b><span style="color:#ffa500">Предупреждение</span></b> (Библиотека не загружена)<br />';
     $error_setting++;
 }
 if (!ini_get('safe_mode')) {
     echo '<img src="../images/img/plus.gif" alt="image" /> Safe Mode: <b><span style="color:#00cc00">ОК</span></b> (Выключено)<br />';
 } else {
     echo '<img src="../images/img/minus.gif" alt="image" /> Safe Mode: <b><span style="color:#ffa500">Предупреждение</span></b> (Включено)<br />';
     $error_setting++;
 }
 if (!ini_get('session.auto_start')) {
     echo '<img src="../images/img/plus.gif" alt="image" /> Session auto start: <b><span style="color:#00cc00">ОК</span></b> (Выключено)<br />';
 } else {
     echo '<img src="../images/img/minus.gif" alt="image" /> Session auto start: <b><span style="color:#ffa500">Предупреждение</span></b> (Включено)<br />';
     $error_setting++;