Skip to content

Instantly share code, notes, and snippets.

@mokoshalb
Forked from abhimanyu003/info.php
Created February 20, 2020 13:29
Show Gist options
  • Save mokoshalb/de2c5dec7e464a416eb7ff824b0e2935 to your computer and use it in GitHub Desktop.
Save mokoshalb/de2c5dec7e464a416eb7ff824b0e2935 to your computer and use it in GitHub Desktop.
Server Status Check.
<!doctype html>
<html lang="en">
<head>
<meta charset="UTF-8">
<title>Server Check</title>
<link rel="stylesheet" href="//maxcdn.bootstrapcdn.com/bootstrap/3.3.5/css/bootstrap.min.css">
</head>
<body>
<div class="container">
<h1>Server Check</h1>
<?php if (version_compare(phpversion(), '5.5.9') == 1): ?>
<div class="alert alert-success fade in">
<strong><i class="glyphicon glyphicon-ok"></i> Your PHP Vesion is <?php echo phpversion(); ?></strong>
</div>
<?php else: ?>
<div class="alert alert-danger fade in">
<strong>Your PHP Vesion is <?php echo phpversion(); ?></strong>
</div>
<?php endif; ?>
<?php if (!extension_loaded('imagick') && !extension_loaded('gd')): ?>
<div class="alert alert-danger fade in">
<strong>Please enable Imagick or GD php extension</strong>
</div>
<?php else: ?>
<div class="alert alert-success fade in">
<strong><i class="glyphicon glyphicon-ok"></i> GD or Imagick is enabled </strong>
</div>
<?php endif; ?>
<?php if (!extension_loaded('fileinfo')): ?>
<div class="alert alert-danger fade in">
<strong>Please enable fileinfo php extension</strong>
</div>
<?php else: ?>
<div class="alert alert-success fade in">
<strong><i class="glyphicon glyphicon-ok"></i> fileinfo is enabled</strong>
</div>
<?php endif; ?>
<?php if (!extension_loaded('curl')): ?>
<div class="alert alert-danger fade in">
<strong>Please enable CURL php extension</strong>
</div>
<?php else: ?>
<div class="alert alert-success fade in">
<strong><i class="glyphicon glyphicon-ok"></i> CURL is enabled</strong>
</div>
<?php endif; ?>
<!-- OpenSSl -->
<?php if (!extension_loaded('openssl')): ?>
<div class="alert alert-danger fade in">
<strong>Please enable openssl extension</strong>
</div>
<?php else: ?>
<div class="alert alert-success fade in">
<strong><i class="glyphicon glyphicon-ok"></i> openssl is enabled</strong>
</div>
<?php endif; ?>
<!-- Mbstring -->
<?php if (!extension_loaded('mbstring')): ?>
<div class="alert alert-danger fade in">
<strong>Please enable Mbstring php extension</strong>
</div>
<?php else: ?>
<div class="alert alert-success fade in">
<strong><i class="glyphicon glyphicon-ok"></i> Mbstring is enabled</strong>
</div>
<?php endif; ?>
<!-- Tokenizer -->
<?php if (!extension_loaded('tokenizer')): ?>
<div class="alert alert-danger fade in">
<strong>Please enable tokenizer extension</strong>
</div>
<?php else: ?>
<div class="alert alert-success fade in">
<strong><i class="glyphicon glyphicon-ok"></i> Tokenizer is enabled</strong>
</div>
<?php endif; ?>
<?php if(function_exists('escapeshellarg') == false): ?>
<div class="alert alert-danger fade in">
<strong>escapeshellarg is disabled please enable escapeshellarg function</strong>
</div>
<?php else: ?>
<div class="alert alert-success fade in">
<strong><i class="glyphicon glyphicon-ok"></i>escapeshellarg is enabled</strong>
</div>
<?php endif; ?>
<?php if (strlen(ini_get('open_basedir')) > 0 && is_file(__FILE__)): ?>
<div class="alert alert-danger fade in">
<strong>open_basedir restriction is in effect, please disable open_basedir restriction</strong>
</div>
<?php else: ?>
<div class="alert alert-success fade in">
<strong><i class="glyphicon glyphicon-ok"></i>open_basedir restriction is not enabled</strong>
</div>
<?php endif; ?>
</div>
</body>
</html>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment