Browse Source

Check for GD-support (JPEG/PNG/GIF)

Peter Hoffmann 8 years ago
parent
commit
4243074a7b
1 changed files with 6 additions and 3 deletions
  1. 6 3
      plugins/check/index.php

+ 6 - 3
plugins/check/index.php

@@ -89,6 +89,12 @@ if (!ini_get('allow_url_fopen')) echo('Warning: You may experience problems with
 # Check mysql version
 if ($database->server_version<50500) echo('Warning: Lychee uses the GBK charset to avoid sql injections on your MySQL version. Please update to MySQL 5.5 or higher to enable UTF-8 support.' . PHP_EOL);
 
+# About GD
+$gdVersion = gd_info();
+if (!$gdVersion['JPEG Support'])	$error .= ('Error: No GD without jpeg support' . PHP_EOL);
+if (!$gdVersion['PNG Support'])	  $error .= ('Error: No GD without png support' . PHP_EOL);
+if (!$gdVersion['GIF Read Support'] || !$gdVersion['GIF Create Support'])	  $error .= ('Error: No GD without full gif support' . PHP_EOL);
+
 # Output
 if ($error==='')	echo('No critical problems found. Lychee should work without problems!' . PHP_EOL);
 else				echo $error;
@@ -108,9 +114,6 @@ else					$imagick = '-';
 if (!isset($imagickVersion, $imagickVersion['versionNumber'])||$imagickVersion==='')	$imagickVersion = '-';
 else																					$imagickVersion = $imagickVersion['versionNumber'];
 
-# About GD
-$gdVersion = gd_info();
-
 # Output system information
 echo('Lychee Version:  ' . $json['version'] . PHP_EOL);
 echo('DB Version:      ' . $settings['version'] . PHP_EOL);