Babel Environment

' . PHP_VERSION . ' Supported'); } else { echo('PHP Version: ' . PHP_VERSION . ' Unsupported'); } echo('
'); if (function_exists('apc_cache_info')) { $score++; echo('... Alternative PHP Cache: Supported'); } else { echo('... Alternative PHP Cache: Unsupported'); } echo('
'); if (@$mmc = new Memcache) { $score++; echo('... Memcache: Supported'); } else { echo('... Memcache: Unsupported'); } echo('
'); if (function_exists('apache_get_version')) { $score++; echo('Runtime Environment: ' . apache_get_version() . ''); echo('
'); $_modules = apache_get_modules(); if (in_array('mod_rewrite', $_modules)) { $score++; echo('... mod_rewrite: Supported'); } else { echo('... mod_rewrite: Missing'); } } else { echo('Runtime Environment: CGI/FastCGI'); } echo('
'); if (function_exists('mysql_connect')) { $score++; echo('MySQL Client API: Supported'); } else { echo('MySQL Client API: Missing'); } echo('
'); if (file_exists('core/Settings.php')) { $score++; echo('Configuration File: Found'); echo('
... Now proceed to parse the configuration file.'); define('V2EX_BABEL', 1); include('core/Settings.php'); echo('
... Configuration file loaded.'); echo('
... Prepare to connect the database.'); $db = @mysql_connect(BABEL_DB_HOSTNAME . ':' . BABEL_DB_PORT, BABEL_DB_USERNAME, BABEL_DB_PASSWORD); echo('
'); if ($db) { $score++; echo('Database Connection: Established'); $mysql_version = mysql_get_server_info(); echo('
'); $mysql_version_major = intval(substr($mysql_version, 0, 1)); $mysql_version_minor = intval(substr($mysql_version, 2, 1)); echo('Database Version: ' . $mysql_version . ''); if ($mysql_version_major == 4) { if ($mysql_version_minor > 0) { $score++; echo(' Supported'); } else { echo(' Unsupported'); } } else { if ($mysql_version_major > 4) { $score++; echo(' Supported'); } else { echo(' Unsupported'); } } mysql_close($db); } else { echo('Database Connection: Failed'); } } else { echo('Configuration file: not found'); } echo('
'); echo('Overall Score: ' . $score . ''); ?> © 2007 V2EX | Project Babel v0.5 Monster Inc