Minigalnano/system_check.php

167 lines
3.5 KiB
PHP
Raw Permalink Normal View History

<?php
/*
* This file is part of MinigalNano: https://github.com/sebsauvage/MinigalNano
*
* MiniGal Nano is based on an original work by Thomas Rybak (© 2010)
*
* MinigalNano is licensed under the AGPL v3 (https://gnu.org/licenses/agpl-3.0.txt).
*/
2015-07-02 00:08:46 +02:00
ini_set("memory_limit", "256M");
$exif = "No";
$gd = "No";
$thumbs = "No";
if (function_exists('exif_read_data')) {
$exif = "Yes";
}
if (extension_loaded('gd') && function_exists('gd_info')) {
$gd = "Yes";
}
if (is_dir('thumbs') && is_writable('thumbs')) {
$thumbs = "Yes";
}
?>
2014-02-01 15:28:07 +01:00
<!DOCTYPE html>
<html>
<head>
2014-02-01 15:28:07 +01:00
<meta http-equiv="Content-Type" content="text/html; charset=UTF-8" />
<meta name="robots" content="noindex, nofollow">
<title>MiniGal Nano system check</title>
<style type="text/css">
body {
background-color: #daddd8;
font: 12px Arial, Tahoma, "Times New Roman", serif;
}
h1 {
font-size: 30px;
margin: 20px 0 5px 0;
letter-spacing: -2px;
}
div {
line-height: 20px;
}
.left {
width: 300px;
display: inline-table;
background-color: #fdffbe;
padding: 2px;
}
.middle-neutral {
font-weight: bold;
text-align: center;
width: 100px;
display: inline-table;
background-color: #fdffbe;
padding: 2px;
}
.middle-no {
font-weight: bold;
text-align: center;
width: 100px;
display: inline-table;
background-color: #ff8181;
padding: 2px;
}
.middle-yes {
font-weight: bold;
text-align: center;
width: 100px;
display: inline-table;
background-color: #98ffad;
padding: 2px;
}
.right {
width: 600px;
display: inline-table;
background-color: #eaf1ea;
padding: 2px;
2015-07-02 00:08:46 +02:00
}
2014-02-01 15:28:07 +01:00
</style>
</head>
<body>
2015-06-30 00:28:57 +02:00
<h1>MiniGal Nano system check</h1>
2014-02-01 15:28:07 +01:00
<div class="left">
PHP Version
</div>
2015-07-02 00:08:46 +02:00
<div class="<?php if (version_compare(phpversion(), "4.0", '>')) {
echo 'middle-yes';
} else {
echo 'middle-no';
}
?>">
<?php echo phpversion();?>
2014-02-01 15:28:07 +01:00
</div>
<div class="right">
2015-07-01 23:54:29 +02:00
<a href="http://www.php.net/" target="_blank">PHP</a> scripting language version 4.0 or greater is needed.
2014-02-01 15:28:07 +01:00
</div>
<br />
2014-02-01 15:28:07 +01:00
<div class="left">
GD library support
</div>
2015-07-02 00:08:46 +02:00
<div class="<?php if ($gd == "Yes") {
echo 'middle-yes';
} else {
echo 'middle-no';
}
?>">
<?php echo $gd;?>
2014-02-01 15:28:07 +01:00
</div>
<div class="right">
2015-07-01 23:54:29 +02:00
<a href="http://www.boutell.com/gd/" target="_blank">GD image manipulation</a> library is used to create thumbnails. Bundled since PHP 4.3.
2014-02-01 15:28:07 +01:00
</div>
<br />
2014-02-01 15:28:07 +01:00
<div class="left">
EXIF support
</div>
2015-07-02 00:08:46 +02:00
<div class="<?php if ($exif == "Yes") {
echo 'middle-yes';
} else {
echo 'middle-neutral';
}
?>">
<?php echo $exif;?>
2014-02-01 15:28:07 +01:00
</div>
<div class="right">
2015-07-01 23:54:29 +02:00
Ability to extract and display <a href="http://en.wikipedia.org/wiki/Exif" target="_blank">EXIF information</a>. The script will work without it, but not display image information.
</div>
<br />
<div class="left">
Thumbnails caching
</div>
2015-07-02 00:08:46 +02:00
<div class="<?php if ($thumbs == "Yes") {
echo 'middle-yes';
} else {
echo 'middle-neutral';
}
?>">
<?php echo $thumbs;?>
2015-07-01 23:54:29 +02:00
</div>
<div class="right">
You should let php create and use the 'thumbs" directory. MiniGal will be <b>much</b> faster.
2014-02-01 15:28:07 +01:00
</div>
<br />
2014-02-01 15:28:07 +01:00
<div class="left">
PHP memory limit
</div>
<div class="middle-neutral">
2015-07-02 00:08:46 +02:00
<?php echo ini_get("memory_limit");?>
2014-02-01 15:28:07 +01:00
</div>
<div class="right">
2015-07-01 23:54:29 +02:00
Memory is needed to create thumbnails. Bigger images uses more memory.
2014-02-01 15:28:07 +01:00
</div>
2014-02-01 15:28:07 +01:00
<footer role="contentinfo">
2014-02-02 18:46:50 +01:00
<a href="https://github.com/sebsauvage/MinigalNano" title="Powered by MiniGal Nano" target="_blank">
2015-07-07 14:01:47 +02:00
Made with miniGal by the community.
2014-02-02 18:46:50 +01:00
</a>
2014-02-01 15:28:07 +01:00
</footer>
</body>
</html>