FreeUnix.davidleemans.be

WordPress site for Linux and other computernerds

Page 11 of 18

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.
 

« Older posts Newer posts »