=')) {
echo "ERROR: PHP 5.5.9 or higher is required.
";
exit(0);
}
if (!extension_loaded('mbstring')) {
echo "ERROR: The requested PHP Mbstring extension is missing from your system.
";
exit(0);
}
if (!empty(ini_get('open_basedir'))) {
echo "ERROR: Please disable the open_basedir setting to continue.
";
exit(0);
}
if (!(file_exists('../storage/app') && is_dir('../storage/app') && (is_writable('../storage/app')))) {
echo "ERROR: The directory [/storage/app] must be writable by the web server.
";
$valid = false;
}
// proc_close() check =========
$proc_close_enabled = true;
try {
$disabled = explode(',', ini_get('disable_functions'));
$proc_close_enabled = !in_array('proc_close', $disabled);
} catch (\Exception $ex) {
$proc_close_enabled = false;
}
if (!$proc_close_enabled) {
echo "ERROR: proc_close() must be enabled.
";
$valid = false;
}
// =============================
// escapeshellarg() check =========
$escapeshellarg_enabled = true;
try {
$disabled = explode(',', ini_get('disable_functions'));
$escapeshellarg_enabled = !in_array('escapeshellarg', $disabled);
} catch (\Exception $ex) {
$escapeshellarg_enabled = false;
}
if (!$escapeshellarg_enabled) {
echo "ERROR: escapeshellarg() must be enabled.
";
$valid = false;
}
// =============================
if (!(file_exists('../storage/framework') && is_dir('../storage/framework') && (is_writable('../storage/framework')))) {
echo "ERROR: The directory [/storage/framework] must be writable by the web server.
";
$valid = false;
}
if (!(file_exists('../storage/logs') && is_dir('../storage/logs') && (is_writable('../storage/logs')))) {
echo "ERROR: The directory [/storage/logs] must be writable by the web server.
";
$valid = false;
}
if (!(file_exists('../bootstrap/cache') && is_dir('../bootstrap/cache') && (is_writable('../bootstrap/cache')))) {
echo "ERROR: The directory [/bootstrap/cache] must be writable by the web server.
";
$valid = false;
}
if($valid) {
require 'main.php';
}