GD extension is now a requirement
authorAlexander Ebert <ebert@woltlab.com>
Mon, 23 May 2016 12:31:10 +0000 (14:31 +0200)
committerAlexander Ebert <ebert@woltlab.com>
Mon, 23 May 2016 12:31:10 +0000 (14:31 +0200)
All though stated as optional for a long time, it should have always
been a requirement. The optionally supported ImageMagick extension does
not offer replacement functions for core functions such as
`getimagesize()` which is frequently used to determine images dimensions
and type. This function (among others) aren't part of the PHP core, but
instead belong to the GD extension itself.

This change doesn't eliminate the ability to use ImageMagick to off-load
heavy work, but instead ensures that GD is available due to being a
crucial component.

wcfsetup/setup/lang/setup_de.xml
wcfsetup/setup/lang/setup_en.xml
wcfsetup/setup/template/stepShowSystemRequirements.tpl
wcfsetup/test.php

index 4adc5e8129f6a31a6817f420060c185aa030e638..b2b76244fc713e77c1646f1b3da88c35ecf985aa 100644 (file)
@@ -32,7 +32,8 @@
                <item name="wcf.global.systemRequirements.uploadMaxFilesize"><![CDATA[Maximale Größe für das Hochladen von Dateien]]></item>
                <item name="wcf.global.systemRequirements.uploadMaxFilesize.description"><![CDATA[Die derzeitige Konfiguration der Skriptsprache „PHP“ macht das Hochladen von Dateien unmöglich. Einige Funktionalitäten werden durch diese Konfiguration nur eingeschränkt funktionieren.]]></item>
                <item name="wcf.global.systemRequirements.gdLib"><![CDATA[Installierte Version der Grafikbearbeitungs-Bibliothek „gdlib“]]></item>
-               <item name="wcf.global.systemRequirements.gdLib.description"><![CDATA[Grafikbearbeitungs-Bibliothek „gdlib“ ist für die dynamische Generierung von Bildern zuständig. Ohne sie werden einige Funktionalitäten der Software nicht funktionieren.]]></item>
+               <item name="wcf.global.systemRequirements.gdLib.description"><![CDATA[Grafikbearbeitungs-Bibliothek „gdlib“ ist für die Verarbeitung und dynamische Generierung von Bildern zuständig.]]></item>
+               <item name="wcf.global.systemRequirements.gdLib.notFound"><![CDATA[nicht gefunden]]></item>
                <item name="wcf.global.systemRequirements.active"><![CDATA[aktiviert]]></item>
                <item name="wcf.global.systemRequirements.notActive"><![CDATA[nicht aktiviert]]></item>
                <item name="wcf.global.systemRequirements.memoryLimit"><![CDATA[Zur Verfügung stehender Arbeitsspeicher]]></item>
index d537e50768a2cf0176d00ff67b28cd2dbe6b306a..f2511d667ffab35ecce05ffff6b354c417a30271 100644 (file)
@@ -32,7 +32,8 @@
                <item name="wcf.global.systemRequirements.uploadMaxFilesize"><![CDATA[Maximum Size for File Uploads]]></item>
                <item name="wcf.global.systemRequirements.uploadMaxFilesize.description"><![CDATA[The current configuration of the installed “PHP” version does not allow file uploads. Due to this configuration, some features of this software will not be available.]]></item>
                <item name="wcf.global.systemRequirements.gdLib"><![CDATA[Installed version of the graphics library “GDLib”]]></item>
-               <item name="wcf.global.systemRequirements.gdLib.description"><![CDATA[The graphics-library “GDLib” is needed for the dynamic image generation. Without this library, some features of this software will not be available.]]></item>
+               <item name="wcf.global.systemRequirements.gdLib.description"><![CDATA[The graphics-library “GDLib” is needed to read images and for the dynamic image generation.]]></item>
+               <item name="wcf.global.systemRequirements.gdLib.notFound"><![CDATA[not found]]></item>
                <item name="wcf.global.systemRequirements.active"><![CDATA[Enabled]]></item>
                <item name="wcf.global.systemRequirements.notActive"><![CDATA[Not enabled]]></item>
                <item name="wcf.global.systemRequirements.memoryLimit"><![CDATA[PHP memory limit]]></item>
index f5309a44b3b40ef4568a1eb870f266bc4a7d7d08..33bc8983526eb428f6d8ec180bcad36d1a4214eb 100644 (file)
                        </dd>
                </dl>
        </fieldset>
+       
+       <fieldset>
+               <legend>{lang}wcf.global.systemRequirements.gdLib{/lang}</legend>
+               <dl>
+                       <dt>{lang}wcf.global.systemRequirements.element.required{/lang} 2.0.0</dt>
+                       <dd>
+                               {lang}wcf.global.systemRequirements.element.yours{/lang} <span class="badge {if !$system.gdLib.result}red{else}green{/if}">
+                                       {if !$system.gdLib.result}
+                                               {lang}wcf.global.systemRequirements.gdLib.notFound{/lang}
+                                       {else}
+                                               {$system.gdLib.value}
+                                       {/if}
+                               </span>
+                               {if !$system.gdLib.result}<small>{lang}wcf.global.systemRequirements.gdLib.description{/lang}</small>{/if}
+                       </dd>
+               </dl>
+       </fieldset>
 </div>
 
 <header class="boxHeadline boxSubHeadline">
                        </dd>
                </dl>
        </fieldset>
-       
-       <fieldset>
-               <legend>{lang}wcf.global.systemRequirements.gdLib{/lang}</legend>
-               <dl>
-                       <dt>{lang}wcf.global.systemRequirements.element.recommended{/lang} 2.0.0</dt>
-                       <dd>
-                               {lang}wcf.global.systemRequirements.element.yours{/lang} <span class="badge {if !$system.gdLib.result}yellow{else}green{/if}">{$system.gdLib.value}</span>
-                               {if !$system.gdLib.result}<small>{lang}wcf.global.systemRequirements.gdLib.description{/lang}</small>{/if}
-                       </dd>
-               </dl>
-       </fieldset>
 </div>
 
 <form method="post" action="install.php">
        <div class="formSubmit">
-               <input type="submit" value="{lang}wcf.global.button.next{/lang}"{if !$system.phpVersion.result || !$system.sql.result || !$system.memoryLimit.result} disabled="disabled"{/if} accesskey="s"/>
+               <input type="submit" value="{lang}wcf.global.button.next{/lang}"{if !$system.phpVersion.result || !$system.sql.result || !$system.memoryLimit.result || !$system.gdLib.result} disabled="disabled"{/if} accesskey="s"/>
                <input type="hidden" name="step" value="{@$nextStep}" />
                <input type="hidden" name="tmpFilePrefix" value="{@$tmpFilePrefix}" />
                <input type="hidden" name="languageCode" value="{@$languageCode}" />
index d805d901cded6a3de2fb7fe544e0e426d54c7ecb..faa32f23fe9a3e1f9faf8dc1c71babc5b543a015 100644 (file)
@@ -91,6 +91,14 @@ else if (!extension_loaded('pcre')) {
        <?php
 }
 
+// check GD extension
+else if (!extension_loaded('gd')) {
+       ?>
+       <p>The 'GD' PHP extension is missing. GD is required for a stable work of this software.<br />
+       Die 'GD' Erweiterung f&uuml;r PHP wurde nicht gefunden. Diese Erweiterung ist f&uuml;r den Betrieb der Software notwendig.</p>
+       <?php
+}
+
 // check safemode
 else if ((is_array($configArray) && !empty($configArray['safe_mode']['local_value']) && $configArray['safe_mode']['local_value'] != 'off') || (@ini_get('safe_mode') && ini_get('safe_mode') != 'off')) {
        ?>