How to install PHP with GD support..

Need help installing PHP, configuring a script, or configuring a server? Then come on in and post your questions! We'll try to help the best we can!

Moderator: General Moderators

Post Reply
RoyPHPDN
Forum Newbie
Posts: 2
Joined: Mon May 14, 2007 9:14 pm

How to install PHP with GD support..

Post by RoyPHPDN »

Hi All..

I really need help configuring PHP with GD support. I am running Fedora 6, Apache and PHP 5.1.6, i have downloaded the gd-2.0.35 file and unpacked it under the directory /usr/lib/php/gd-2.0.35. I followed the instructions to install it which is as follows. Firstly ./configure --with-gd then make and lastly make install.. Everything installed with no errors. But now when i look at the phpinfo i still get the --without-gd. I really am lost as to how to make it --with-gd. Can someone please help me. Any help would be greatly appreciated
User avatar
volka
DevNet Evangelist
Posts: 8391
Joined: Tue May 07, 2002 9:48 am
Location: Berlin, ger

Post by volka »

Is your goal
a) to compile php from sources ...with gd-support or
b) to have gd support ...even if you have to compile php from sources
?

If b) then install the php-gd package (and maybe reinstall php to cure any damage that your attempts to compile&install php might have caused)
User avatar
CoderGoblin
DevNet Resident
Posts: 1425
Joined: Tue Mar 16, 2004 10:03 am
Location: Aachen, Germany

Post by CoderGoblin »

Know this might sound stupid... Have you restarted the webserver ?
StrangeRanger
Forum Newbie
Posts: 19
Joined: Tue Jan 31, 2006 2:26 pm

Re: How to install PHP with GD support..

Post by StrangeRanger »

RoyPHPDN wrote: But now when i look at the phpinfo i still get the --without-gd.
Dood, I'm having the exact same problem! Have you had any luck? PLEASE, for the love of all things holy post your solution if you have found one.

I used yum install php-gd to get gd support enabled on my sever, and it worked. I found numerous test scripts to check for gd support and they all passed w/ flying colors, but gd still is not working properly on my website. And I just know it's that little '--without-gd' line in my config file but I don't know how to fix that.

Can anyone out there please help?!

Thank you in advance,
j
StrangeRanger
Forum Newbie
Posts: 19
Joined: Tue Jan 31, 2006 2:26 pm

Post by StrangeRanger »

Bump ^^^
j
User avatar
volka
DevNet Evangelist
Posts: 8391
Joined: Tue May 07, 2002 9:48 am
Location: Berlin, ger

Re: How to install PHP with GD support..

Post by volka »

StrangeRanger wrote:And I just know it's that little '--without-gd' line in my config file but I don't know how to fix that.
Loading the extenion doesn't change the config parameters line in the output of phpinfo() but still enables gd support.
StrangeRanger wrote:I found numerous test scripts to check for gd support and they all passed w/ flying colors, but gd still is not working properly on my website.
Please post an example script that doesn work.
StrangeRanger
Forum Newbie
Posts: 19
Joined: Tue Jan 31, 2006 2:26 pm

Re: How to install PHP with GD support..

Post by StrangeRanger »

StrangeRanger wrote:I found numerous test scripts to check for gd support and they all passed w/ flying colors, but gd still is not working properly on my website.
Please post an example script that doesn work.[/quote]

I'd like to but I can't because it's part of my shopping cart package. But I know the script works because I have set up a WAMP and it works fine. And the only thing I've noticed different between the WAMP & the LAMP is that little line in my config file. The WAMP has '--with-gd' and the LAMP has '-without-gd' so that is where my assumption started.

Ideas? Thanks,
j
User avatar
volka
DevNet Evangelist
Posts: 8391
Joined: Tue May 07, 2002 9:48 am
Location: Berlin, ger

Post by volka »

What does

Code: Select all

<?php
extension_loaded('gd') or die('no gd module');
echo '<pre>', var_export(gd_info(), true), "</pre>\n";
print?
StrangeRanger
Forum Newbie
Posts: 19
Joined: Tue Jan 31, 2006 2:26 pm

Post by StrangeRanger »

Yup, did that before and got:
array (
'GD Version' => 'bundled (2.0.28 compatible)',
'FreeType Support' => true,
'FreeType Linkage' => 'with freetype',
'T1Lib Support' => false,
'GIF Read Support' => true,
'GIF Create Support' => true,
'JPG Support' => true,
'PNG Support' => true,
'WBMP Support' => true,
'XPM Support' => false,
'XBM Support' => true,
'JIS-mapped Japanese Font Support' => false,
Do these help:
http://www.invertedgravity.com/volka.php
http://www.invertedgravity.com/gdtest.php
http://www.invertedgravity.com/phpinfo.php

Thanks for looking!
j
User avatar
volka
DevNet Evangelist
Posts: 8391
Joined: Tue May 07, 2002 9:48 am
Location: Berlin, ger

Post by volka »

StrangeRanger wrote:but gd still is not working properly on my website.
please elucidate
StrangeRanger
Forum Newbie
Posts: 19
Joined: Tue Jan 31, 2006 2:26 pm

Post by StrangeRanger »

volka wrote:
StrangeRanger wrote:but gd still is not working properly on my website.
please elucidate
Sorry, probably should have explained that from the get go eh? My cart software has a feature to automatically generate thumbnail images from larger images, and that is the feature that I can not get working properly. It "tries" to work, but doesn't it. What do I mean by that, well, it generates like image placeholders. Like when an image file is missing you know how the browser simply places a placeholder w/ the file name. That's what it's doing.

Thanks for helping,
j
User avatar
volka
DevNet Evangelist
Posts: 8391
Joined: Tue May 07, 2002 9:48 am
Location: Berlin, ger

Post by volka »

right-click this placeholder and copy its url.
Open a new browser tab/window and paste the url, i.e. request the image "directly".
What does it display?
If it's still an empty page or a "cannot load the image" placeholder open the browser's source view. There should be an error message.
StrangeRanger
Forum Newbie
Posts: 19
Joined: Tue Jan 31, 2006 2:26 pm

Post by StrangeRanger »

OMFG! I'm sooooooooo embarassed. I don't even want to tell you what I think I did wrong. I forgot to change the folder permissions back so it can be written to. Stoopid stoopid stoopid!!

Thanks for helping anyway.
j
User avatar
volka
DevNet Evangelist
Posts: 8391
Joined: Tue May 07, 2002 9:48 am
Location: Berlin, ger

Post by volka »

:)
Post Reply