WordPress site for Linux and other computernerds

Month: July 2015

Fix the Gallery 2.3.x “This GD version is too old” error

 
For any one out there running Gallery 2.3.x (a web based photo album), this posting gives you a fix for the problem with he GD plugin.
 

The problem

 

Gallery 2.x is a web based photo album, written in PHP. As such, you can create albums and upload photos into these albums. Gallery then takes care of creating thumbnails and intermediate sized versions of your photos. For this purpose, Gallery needs some graphics toolkit, like GD or NetPBM.
GD is the most widely used toolkit, as it usually comes bundled with PHP. However, Gallery fails to properly detect the version of GD available on the system.

 
The GD config fails with this message:

GD Version: 2.1.0 (bundled) Required:2.0
Failed
This GD version is too old and is not supported by this module! Please upgrade your PHP installation to include the latest GD version.

 

It seems weird: the GD version bundled with PHP (2.1.0) meets and even exceeds the required version. Yet Gallery fails to properly detect this, and hence refuses to activate the GD plugin.

 

The solution

 

In your Gallery installation, make the following change on line 286 from …/modules/gd/classes/GdToolkitHelper.class:

 
Change this:

 if (preg_match('/^>?2\.0/', $gdVersion)) 

into this:

 if (preg_match('/^>?2\.[0-9]/', $gdVersion)) 

 

So, just change the .0 to .[0-9], and save the file. Afterwards, in Gallery, you can activate the GD plugin, and it should work.
 

LXDM 0.5.1 for Slackware

 

Package for Slackware 14.1 x64: latest version of the LXDM graphical login manager. Very usefull if you want a graphical login on your Slackware box, and use XFCE as desktop environment.

 
Download link:

If your regular user account is not in the audio group, then make sure you explicitly add it to that group. Otherwise, no sound for you after logging in with lxdm.

 

Enjoy 😉