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
User avatar
s.dot
Tranquility In Moderation
Posts: 5001
Joined: Sun Feb 06, 2005 7:18 pm
Location: Indiana

gd support

Post by s.dot »

Note: Since PHP 4.3 there is a bundled version of the GD lib. This bundled version has some additional features like alpha blending, and should be used in preference to the external library since its codebase is better maintained and more stable.
I am using 4.4.1 so I have the bundled version. I was told I will have to recompile PHP to enable GD. Is this true? Or can I just configure something?

php.net/gd says this
To enable GD-support configure PHP --with-gd[=DIR], where DIR is the GD base install directory. To use the recommended bundled version of the GD library (which was first bundled in PHP 4.3.0), use the configure option --with-gd. GD library requires libpng and libjpeg to compile.
Which seems completely foreign to me. :-P
Set Search Time - A google chrome extension. When you search only results from the past year (or set time period) are displayed. Helps tremendously when using new technologies to avoid outdated results.
josh
DevNet Master
Posts: 4872
Joined: Wed Feb 11, 2004 3:23 pm
Location: Palm beach, Florida

Post by josh »

configure is a process in compiling

Code: Select all

./configure --with-gd
make
make install
User avatar
s.dot
Tranquility In Moderation
Posts: 5001
Joined: Sun Feb 06, 2005 7:18 pm
Location: Indiana

Post by s.dot »

do this in my php directory?
Set Search Time - A google chrome extension. When you search only results from the past year (or set time period) are displayed. Helps tremendously when using new technologies to avoid outdated results.
josh
DevNet Master
Posts: 4872
Joined: Wed Feb 11, 2004 3:23 pm
Location: Palm beach, Florida

Post by josh »

type that in the command line, but first you need the PHP source
User avatar
Chris Corbyn
Breakbeat Nuttzer
Posts: 13098
Joined: Wed Mar 24, 2004 7:57 am
Location: Melbourne, Australia

Post by Chris Corbyn »

What operating system are you using? Some package management systems will let you specify that configuration. Gentoo for example:

Code: Select all

linux # USE="gd" emerge dev-lang/php
If you're using something like red hat or an RPM based system I would never install PHP using the package managers. Download the source code (.tar.gz) from the PHP website, extract the sources (tar -xvzf php-<version>.tar.gz), and then go into the directory it creates and run the configure with any options you need before installing. Like jshpro2 said:

Code: Select all

linux #  ./configure --help  #Take a look at the various options available
linux #  ./configure --with-gd --with-mysql=/usr/local/mysql --with-apxs2=/usr/local/apache2/bin/apxs
linux #  make
linux #  make install
The above is just an example... you can have whatever options at the ./configure command that you need. If you want to know where all the files are going to end up more easily....

Code: Select all

linux #  ./configure --prefix=/usr/local/php
Post Reply