Gd library not seen by Gallery2

adrian_vg

Joined: 2009-07-04
Posts: 21
Posted: Sat, 2009-07-04 09:44


Gallery version (not just "2"): 2.3
PHP version (e.g. 5.1.6): 5.1.6
PHPInfo Link (see FAQ): Available on request. Don't like having it active for the world.
Webserver (e.g. Apache 1.3.33): Apache 2.2
Database (e.g. MySql 5.0.32): mysql Ver 14.12 Distrib 5.0.45, for redhat-linux-gnu (i686) using readline 5.0
Activated toolkits (e.g. NetPbm, GD): Netpbm, Imagemagick, jpegtran, dcraw, ffmpeg
Operating system (e.g. Linux): CentOS 5.3 i386
Browser (e.g. Firefox 2.0): Firefox 3.5

Gallery2 running fine. The other day I wanted to enable Captcha to increase performance. Captcha requires the gd toolkit, so I installed it and it's libraries. All went fine. In Gallery2 site admin I installed gd and it said I should configure it, so I clicked configure. On the configure page it says "GD library version: You don't seem to have the GD library available on this PHP installation." and refuses to activate.

As far as I can tell the gd package, its tools and libs are there.

I'm at a loss here, can you help please to solve this problem?

Thank you.
--
/AvG

 
nivekiam
nivekiam's picture

Joined: 2002-12-10
Posts: 16502
Posted: Sat, 2009-07-04 13:44

Post a link to your phpinfo or send me a link via PM
____________________________________________
Like Gallery? Like the support? Donate now!!! See G2 live here

 
adrian_vg

Joined: 2009-07-04
Posts: 21
Posted: Sat, 2009-07-04 15:53

You have a PM! Thanks.
--
/AvG

 
nivekiam
nivekiam's picture

Joined: 2002-12-10
Posts: 16502
Posted: Sat, 2009-07-04 16:07

First you need to increase your memory limit to 32MB

FAQ: PHP memory_limit - Why do I get the error Allowed memory size of Xxx bytes exhausted?

Second, GD support is not loaded into PHP. Contact your host about that.

And honestly, I wouldn't even bother with GD. The exec function isn't disabled on your server, so I'd try to get either ImageMagick or NetPBM installed and working.
____________________________________________
Like Gallery? Like the support? Donate now!!! See G2 live here

 
adrian_vg

Joined: 2009-07-04
Posts: 21
Posted: Sat, 2009-07-04 17:30

Thanks for replying.

nivekiam wrote:
First you need to increase your memory limit to 32MB

FAQ: PHP memory_limit - Why do I get the error Allowed memory size of Xxx bytes exhausted?

Done. Added it to the .htaccess in.../gallery2. I don't quite understand why this is necessary though, as I did not get the errror "Allowed memory size of Xxx bytes exhausted"??

nivekiam wrote:
Second, GD support is not loaded into PHP. Contact your host about that.

And honestly, I wouldn't even bother with GD. The exec function isn't disabled on your server, so I'd try to get either ImageMagick or NetPBM installed and working.

Kinda' figured that out myself. ;-) I'm hosting my own server, ie I have root access, and whatever I do I can't get GD loading into PHP. Figured you could give me a hint on how to fix this. Not sure how to proceed with this otherwise.

I wanted to use Captcha, which requires GD. Following your hint above, I won't be able to use Captcha, as it requires GD. Am I understanding it right?

FWIW, NetPBM and ImageMagick is working fine on my Galleryinstallation.

Edit: Found this: http://codex.gallery2.org/Installing_an_Image_Processing_Library#GD, but I don't feel it's quite relevant for me, as I run linux. Also found this, http://www.libgd.org/FAQ_PHP#How_do_I_get_gd_to_work_with_PHP.3F, but here they speak of re-compiling php, which is something I'd rather not do as I don't have the knowledge. 8-/
--
/AvG

 
adrian_vg

Joined: 2009-07-04
Posts: 21
Posted: Sat, 2009-07-04 17:40

Or maybe I should just forget about Captcha and ignore GD altogether, as there are thousands of articles describing all kinds of small hells trying to compile gd-support in php. I'm leaning towards this.. 8-}

--
/AvG

 
nivekiam
nivekiam's picture

Joined: 2002-12-10
Posts: 16502
Posted: Sat, 2009-07-04 21:53
Quote:
I'm hosting my own server, ie I have root access, and whatever I do I can't get GD loading into PHP. Figured you could give me a hint on how to fix this. Not sure how to proceed with this otherwise.

Possibly. What Linux distribution? Debian? Sure. Something else, maybe.
____________________________________________
Like Gallery? Like the support? Donate now!!! See G2 live here

 
adrian_vg

Joined: 2009-07-04
Posts: 21
Posted: Sun, 2009-07-05 07:59
nivekiam wrote:
Quote:
I'm hosting my own server, ie I have root access, and whatever I do I can't get GD loading into PHP. Figured you could give me a hint on how to fix this. Not sure how to proceed with this otherwise.

Possibly. What Linux distribution? Debian? Sure. Something else, maybe.

Linux; CentOS 5.3.

--
/AvG

 
nivekiam
nivekiam's picture

Joined: 2002-12-10
Posts: 16502
Posted: Sun, 2009-07-05 15:22

looks like it's just yum install php-gd, then restart the web server.

http://www.centos.org/modules/newbb/viewtopic.php?forum=8&topic_id=4233&viewmode=threaded

____________________________________________
Like Gallery? Like the support? Donate now!!! See G2 live here

 
adrian_vg

Joined: 2009-07-04
Posts: 21
Posted: Sun, 2009-07-05 17:14
nivekiam wrote:
looks like it's just yum install php-gd, then restart the web server.

http://www.centos.org/modules/newbb/viewtopic.php?forum=8&topic_id=4233&viewmode=threaded

Thank you, it worked!! I can't believe I missed the above link, after all my googling. Php-gd installed now, dito the gd-package, dito the Captcha package.

A thousand thanks, you rock bigtime!!
--
/AvG

 
floridave
floridave's picture

Joined: 2003-12-22
Posts: 22885
Posted: Sun, 2009-07-05 20:25
Quote:
I wanted to enable Captcha to increase performance.

Captcha doe snot increase performance but is increases security slightly. Perhaps that is what you meant.

Dave
_____________________________________________
Blog & G2 || floridave - Gallery Team

 
adrian_vg

Joined: 2009-07-04
Posts: 21
Posted: Mon, 2009-07-06 07:21
floridave wrote:
Quote:
I wanted to enable Captcha to increase performance.

Captcha doe snot increase performance but is increases security slightly. Perhaps that is what you meant.

Check the fifth bullet on http://codex.gallery2.org/Gallery2:Performance_Tips#Modules .

It's a zen thing. 8-)
--
/AvG

 
floridave
floridave's picture

Joined: 2003-12-22
Posts: 22885
Posted: Mon, 2009-07-06 14:01

I will fix that later today

Dave
_____________________________________________
Blog & G2 || floridave - Gallery Team