Title: [Plugin: NextGEN Gallery] &#8211; no GD Library ??
Last modified: August 19, 2016

---

# [Plugin: NextGEN Gallery] – no GD Library ??

 *  [lobsterlog](https://wordpress.org/support/users/lobsterlog/)
 * (@lobsterlog)
 * [17 years, 7 months ago](https://wordpress.org/support/topic/plugin-nextgen-gallery-no-gd-library/)
 * Hi
    I just installed the NextGEN plugin. Everything seems to be working, but 
   after uploading images, on the thumbnail creation page, I get the following error:
 * You do not have the GD Library installed. This class requires the GD library 
   to function properly. visit [http://us2.php.net/manual/en/ref.image.php](http://us2.php.net/manual/en/ref.image.php)
   for more information
 * Is this something I can fix myself or is it that my host has not installed this
   part of PHP? (which would make the plugin not usable for me, as I doubt I can
   make them install anything)
 * Thanks for any help
 * [http://wordpress.org/extend/plugins/nextgen-gallery/](http://wordpress.org/extend/plugins/nextgen-gallery/)

Viewing 9 replies - 1 through 9 (of 9 total)

 *  Thread Starter [lobsterlog](https://wordpress.org/support/users/lobsterlog/)
 * (@lobsterlog)
 * [17 years, 7 months ago](https://wordpress.org/support/topic/plugin-nextgen-gallery-no-gd-library/#post-868935)
 * Hi again
 * I managed to find some more info about the GD library and how to make it run.
 * My host is running PHP Version 5.2.6, but GD support is turned off. I could turn
   it on by adding
    extension=php_gd2.so to the php.ini in the WordPress folder.
   After this, when running a script with phpinfo() in this folder I get:
 * GD Support enabled
    GD Version bundled (2.0.34 compatible) FreeType Support enabled
   FreeType Linkage with freetype FreeType Version 2.3.5 GIF Read Support enabled
   GIF Create Support enabled JPG Support enabled PNG Support enabled WBMP Support
   enabled XBM Support enabled T1Lib Support: Disabled I then tried to run this 
   script in the npgallery folder and did not get the GD support. I copied th php.
   ini file from the WordPress folder into the npgallery folder and then it worked.
 * At this point I reinstalled the Nextgen Gallery (I deleted the plugin in WP and
   checked that the folder in plugins was gone). After installing it again, the 
   plugin still tells me
    * Operating System : Linux * Server : Apache * Memory 
   usage : 14.04 MByte * MYSQL Version : 5.0.67-log * SQL Mode : Not set * PHP Version:
   5.2.6 * PHP Safe Mode : Off * PHP Allow URL fopen : On * PHP Memory Limit : 1024M*
   PHP Max Upload Size : 2M * PHP Max Post Size : 8M * PHP Max Script Execute Time:
   30s * PHP Exif support : Yes ( V1.4 ) * PHP IPTC support : Yes * PHP XML support:
   Yes
 * No GD support!
 * I have tested a php script using some GD commands in the npgallery folder and
   it works fine, the library definitely can be used. But npgallery still is not
   working, when it tries to generate thumbnails, I get the same error message as
   before.
 * Please, any ideas what I am doing wrong?
    Thanks
 *  Thread Starter [lobsterlog](https://wordpress.org/support/users/lobsterlog/)
 * (@lobsterlog)
 * [17 years, 7 months ago](https://wordpress.org/support/topic/plugin-nextgen-gallery-no-gd-library/#post-868955)
 * Hi
 * I promise this is the last time I answer to my own post 🙂
 * I have looked at the npgallery code now. When I select the Gallery tap in the
   WP admin, the file /npgallery/admin/wp25/overview.php is loaded (why the wp25
   and not the one in /npgallery/admin/ ?)
 * In this file there is a function ngg_gd_info() which checks for GD support:
    
   if(function_exists(“gd_info”)) {echo ‘<h4>’.__(‘GD support’, ‘nggallery’).'</
   h4><ul class=”settings”>’;} else {echo ‘<h4>’.__(‘No GD support’, ‘nggallery’).’!
   </h4>
    - ‘;
 * I keep seeing “No GD support” in the admin tap.
 * Now I wrote a php script
    if(function_exists(“gd_info”)) echo “it EXISTS”; and
   placed it in the same folder…and what do I get? it EXISTS
 * I am totally lost how this is possible. Any ideas anyone?
 *  [Alex Rabe](https://wordpress.org/support/users/alexrabe/)
 * (@alexrabe)
 * [17 years, 7 months ago](https://wordpress.org/support/topic/plugin-nextgen-gallery-no-gd-library/#post-868987)
 * No idea, something in your PHP setup seems to be wrong. Can you upload with the
   WordPress core media uploader ?
 *  Thread Starter [lobsterlog](https://wordpress.org/support/users/lobsterlog/)
 * (@lobsterlog)
 * [17 years, 7 months ago](https://wordpress.org/support/topic/plugin-nextgen-gallery-no-gd-library/#post-869001)
 * hi
    thanks for the answer
 * yes I can, the core uploader works fine. I also tested a few other scripts that
   use the GD library, they all work on the same server.
 * I am really extremely clueless. Clicking on the “Gallery” tap loads the overview.
   php page in the wp25 folder.
    In that file the function checking for the GD lib
   goes into the “else” part of the function_exists loop.
 * If I add an additional line to the script at the end:
 * if(function_exists(“gd_info”))
    echo “it EXISTS”;
 * the text appears (somewhere) on the page, i.e. the function is found.
    The only
   part in the GD lib setup that is disabled is on the server is T1Lib Support: 
   Disabled I don know if this matters.
 * Anyway, I do NOT understand how two identical “if” statements in the same file
   can result in two different outcomes. I am totally baffled by this.
 *  [Alex Rabe](https://wordpress.org/support/users/alexrabe/)
 * (@alexrabe)
 * [17 years, 7 months ago](https://wordpress.org/support/topic/plugin-nextgen-gallery-no-gd-library/#post-869022)
 * You can comment out the check, so it maybe work in your case.
    loook into the
   thumbnail.lib.php, there is a other check, which you can disable
 *  Thread Starter [lobsterlog](https://wordpress.org/support/users/lobsterlog/)
 * (@lobsterlog)
 * [17 years, 7 months ago](https://wordpress.org/support/topic/plugin-nextgen-gallery-no-gd-library/#post-869077)
 * Hi again
    my progress is limited…but I am learning alot about php at least. So
   here is what I know now (also, the info in my last post has been slightly incorrect)
 * 1) GD library is not loaded by default on my server, but can be added by
    extension
   = gd.so in the php.ini file. Somehow the settings on this server (as far as I
   could figure it out) require that such a php.ini file is placed directly into
   the folder from which the script in question is run. This I have tested with 
   the small test script:
 * $array=gd_info ();
    foreach ($array as $key=>$val) { if ($val===true) { $val=”
   Enabled”; } if ($val===false) { $val=”Disabled”; } echo “$key: $val \n”; }
 * As soon as a php.ini with the above mentioned line is in the same folder, this
   script works and lists the GD settings. But it really only works if php.ini is
   in the folder.
 * 2) Thinking that this might be my problem, I have copied the php.ini created 
   by WordPress into each and every folder that contains php-files, both of the 
   WordPress installation and the NGGallery plugin.
    As a consequence, the test 
   script now works in all of these folders.
 * 3) I went further and tested the GD functions with an example from the php-manual:
   
   header (‘Content-type: image/png’); $im = @imagecreatetruecolor(120, 20) or die(‘
   Cannot Initialize new GD image stream’); $text_color = imagecolorallocate($im,
   233, 14, 91); imagestring($im, 1, 5, 5, ‘A Simple Text String’, $text_color);
   imagepng($im); imagedestroy($im);
 * This works also in all the NGGallery and WordPress folders.
 * 4) When I now click on the Gallery tap in the WordPress admin (the link opened
   is ./wordpress/wp-admin/admin.php?page=nggallery)
    I still get the “No GD support”
   line. My last post was incorrect that if(function_exists(“gd_info”)) returns 
   true elsewhere in the file that creates this page (overview.php). In this script
   it does not work anywhere.
 * 5) My idea was that probably the script that produces the shown output (overview.
   php) is in practise not executed from the folder where it is stored but from 
   somewhere else. Hence I copied the required php.ini to each and every folder 
   in the WordPress installation, but it does not change anything.
 * I still suspect that this is my problem, somehow the NGGallery code is executed
   within WordPress in such a way that the php.ini files with extension = gd.so 
   are not used.
    Here my (very limited) php knowledge is long exhausted. I have
   no idea if and how this is possible and how it could be fixed.
 * Any ideas?
 *  Thread Starter [lobsterlog](https://wordpress.org/support/users/lobsterlog/)
 * (@lobsterlog)
 * [17 years, 7 months ago](https://wordpress.org/support/topic/plugin-nextgen-gallery-no-gd-library/#post-869108)
 * And yet again…
 * After all this testing, the solution was extremely simple of course…
 * Due to some weird combination of how my hosts server is configured and how WordPress
   runs scripts, the php.ini file activating the GD library had to be placed into
   my home folder (outside the www folder)… oh well, only took me 1 day to figure
   that out :-X
 * Anyway, now it works. Thanks so much for a terrific plugin! And for taking your
   time to reply to dumb users like me here 🙂
 * ps: I know it´s a bit assuming, but I would like to make a suggestion for a future
   feature, which I fould in a few other gallery integrations. Namely a widget that
   displays all Gallerys/Albums as a folder tree. Dunno if you ever thought about
   that, but I would love it 🙂
 * Thanks again
 *  [thelalinamecom](https://wordpress.org/support/users/thelalinamecom/)
 * (@thelalinamecom)
 * [17 years, 7 months ago](https://wordpress.org/support/topic/plugin-nextgen-gallery-no-gd-library/#post-869278)
 * I am having the same issue.
 * I get No GD support!
 * when looking at my system settings in NextGen
 * Server Settings
    Operating System : Linux Server : Apache Memory usage : 9.58
   MByte MYSQL Version : 5.0.45 SQL Mode : Not set PHP Version : 5.1.6 PHP Safe 
   Mode : Off PHP Allow URL fopen : On PHP Memory Limit : 32M PHP Max Upload Size:
   2M PHP Max Post Size : 8M PHP Max Script Execute Time : 30s PHP Exif support :
   Yes ( V1.4 ) PHP IPTC support : Yes PHP XML support : Yes No GD support!
 * I added “extension = gd.so” to php.ini
 * What else do I need 2 do ?
 *  [thelalinamecom](https://wordpress.org/support/users/thelalinamecom/)
 * (@thelalinamecom)
 * [17 years, 7 months ago](https://wordpress.org/support/topic/plugin-nextgen-gallery-no-gd-library/#post-869281)
 * looks like have it solved.
 * running Centos 5 and SeLinux so add some extra permissions that needed to be 
   enabled. Also restarted my server and GD now active

Viewing 9 replies - 1 through 9 (of 9 total)

The topic ‘[Plugin: NextGEN Gallery] – no GD Library ??’ is closed to new replies.

 * 9 replies
 * 3 participants
 * Last reply from: [thelalinamecom](https://wordpress.org/support/users/thelalinamecom/)
 * Last activity: [17 years, 7 months ago](https://wordpress.org/support/topic/plugin-nextgen-gallery-no-gd-library/#post-869281)
 * Status: not resolved

## Topics

### Topics with no replies

### Non-support topics

### Resolved topics

### Unresolved topics

### All topics
