Skip to content

Instantly share code, notes, and snippets.

@abhimanyu003 abhimanyu003/info.php Secret
Last active Mar 25, 2018

Embed
What would you like to do?
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>
@abhimanyu003

This comment has been minimized.

Copy link
Owner Author

commented Jul 3, 2016

How to use server check script.

  • Login to FTP account
  • Create a info.php in your public_html or httdocs folder with the above code.
  • Visit example.com/info.php
  • If everything is comes green you are good to go. :)
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
You can’t perform that action at this time.