Topic: buildgallery.php finds GD, does not generate thumbs

hey guys,

First time trying to use this gallery setup, and it's mostly going well, but thumbnails are not being created.  First of all, per the FAQ, I tried with useCopyResized set to both true and false with no results.  As background, the server is 32bit FreeBSD 6.2-STABLE, PHP 4.4.7 and Apache 1.3.37.  Here's the output of the PHP script:

Creating XML and thumbnails for SimpleViewer.

( buildgallery.php version 1.9, running under php version 4.4.7, GD library version 2.0.28)

12 jpg images found in images folder.

Sorting images by date. Sort in reverse order.

   1. 032803-04.jpg
   2. 111503-01.jpg
   3. 032803-03.jpg
   4. 032803-02.jpg
   5. 111503-07.jpg
   6. 111503-02.jpg
   7. 111503-03.jpg
   8. 032803-01.jpg
   9. 111503-06.jpg
  10. 111503-05.jpg
  11. 111503-04.jpg
  12. 115-1503_IMG.jpg

Successfully created XML document: gallery.xml

Warning: the useCopyResized setting has been set to true. Thumbnails will be of lower quality. You might want to create the thumbnails yourself in a graphics application such as Photoshop.

Attempting to create thumbnails in thumbs folder:

And it stops, with no errors, no anything about making thumbs.  I had chown -R 777 thumbs and images, and both .xml files are also 777.  Nothing has been changed with the paths, and all .jpg extensions are lowercase.  I also tried with the older 1.7 version, but the output of the script had an error: Cannot open XML document: $file. Change permissions to 0777 for $file and parent directory.

In case it matters, here's my PHP configure line:

Configure Command =>  ./configure --with-apache=/usr/apache --with-mysql=/usr --enable-track-vars --with-bz2 --enable-ftp --with-zlib --enable-mbstring --enable-memory-limit --with-gd --with-png --with-libpng --with-bcmath --enable-exif

I tried --with-gd-dir and --with-gd-dir=/usr/local/bin , but GD support did not show up in phpinfo(); and obviously the buildgallery.php script didn't see it either. 

When I use $ for i in *.jpg; do convert -quality 100 -resize 65x65 $i ../thumbs/$i; done  the thumbnails are created and my gallery loads fine.  Afterwards, when I ran the script again just to see what it'd do, it showed the thumbnails already exist.

It's not a huge task to create my own thumbnails as shown above, but if the script is there and is supposed to do it.... wink  Any help is appreciated.

Re: buildgallery.php finds GD, does not generate thumbs

Found my problem.  It's supposed to be --with-gd=DIR instead of --with-gd-dir[=DIR].  My new PHP configure line is:

$ php -i | grep configure | tr -d "'"
Configure Command =>  ./configure --with-apache=/usr/apache --with-mysql=/usr --enable-track-vars --with-bz2 --enable-ftp --with-zlib --enable-mbstring --enable-memory-limit --with-gd=/usr/local --with-jpeg --with-png --with-libpng --with-bcmath --enable-exif

Hopefully this will help someone else.  PHP's built-in GD library wouldn't generate the thumbnails.

Re: buildgallery.php finds GD, does not generate thumbs

Glad you fixed it. Your original printout with the sudden death ending makes me think that buildgallery.php is a bit toooo keen to suppress php error messages. When I get a moment, I'll look at the code and see what can be done about that.


Jack Hardie
SimpleViewer Support Team.

Re: buildgallery.php finds GD, does not generate thumbs

Hi guys
I need some little
How to setup the Php configuration file to be able to have GD
What file do I need to modify?
Thanks in advance

Re: buildgallery.php finds GD, does not generate thumbs

You can't just change one file, you need to recompile PHP and, possibly, Apache. 

If you read my first post and see all the information that was provided it will give you a better idea of what people need in order to help.  Linux or FreeBSD or something else?  Compiled from source or ports/packages/etc?  Is PHP a compiled module or dynamically-loaded?