Пример #1
0
/**
 * finds the correctly working versions of PHP-JSON
 * @return bool True if NOT found or WRONG version
 */
function returnPhpJsonStatus()
{
    $goodVersions = array('1.1.1');
    if (function_exists('json_encode')) {
        $phpInfo = getPhpInfo(8);
        if (!in_array($phpInfo['json']['json version'], $goodVersions)) {
            return true;
            // bad version found
        } else {
            return false;
            // all requirements met
        }
    }
    return true;
    // not found
}
Пример #2
0
/**
 * finds the correctly working versions of PHP-JSON
 * @return bool True if NOT found or WRONG version
 */
function returnPhpJsonStatus()
{
    if (function_exists('json_encode')) {
        $phpInfo = getPhpInfo(8);
        return version_compare($phpInfo['json']['json version'], '1.1.1', '<');
    }
    return true;
    // not found
}
    $mbstringStatus = "<b><span class=go>{$mod_strings['LBL_CHECKSYS_OK']}</font></b>";
} else {
    $mbstringStatus = "<b><span class=stop>{$mod_strings['ERR_CHECKSYS_MBSTRING']}</font></b>";
    $error_found = true;
}
// zlib
if (function_exists('gzclose')) {
    $zlibStatus = "<b><span class=go>{$mod_strings['LBL_CHECKSYS_OK']}</span></b>";
} else {
    $zlibStatus = "<b><span class=go>{$mod_strings['ERR_CHECKSYS_ZLIB']}</span></b>";
}
// php-json
if (function_exists('json_encode')) {
    $jsonPhpStatus = "<b><span class=go>{$mod_strings['LBL_CHECKSYS_OK']}</span></b>";
    if (returnPhpJsonStatus()) {
        $phpInfo = getPhpInfo(8);
        $jsonPhpStatus = "<b><span class='go'>{$mod_strings['ERR_CHECKSYS_PHP_JSON_VERSION']}<br>" . $mod_strings['LBL_CHECKSYS_VER'] . $phpInfo['json']['json version'] . " )</span></b>";
    }
} else {
    $jsonPhpStatus = "<b><span class='go'>{$mod_strings['ERR_CHECKSYS_PHP_JSON']}</span></b>";
}
// imap
if (function_exists('imap_open')) {
    $imapStatus = "<b><span class=go>{$mod_strings['LBL_CHECKSYS_OK']}</span></b>";
} else {
    $imapStatus = "<b><span class=go>{$mod_strings['ERR_CHECKSYS_IMAP']}</span></b>";
}
// config.php
if (make_writable('./config.php')) {
    $configStatus = "<b><span class=go>{$mod_strings['LBL_CHECKSYS_OK']}</span></b>";
} elseif (is_writable('.')) {