View Full Version : Recompiling PHP with gd

28th August 2007, 09:40 PM
Hey all,

I would like to recompile PHP to add gd support. The gd FAQ (http://libgd.org/FAQ_PHP#How_do_I_get_gd_to_work_with_PHP.3F) says to recompile with the following settings:

./configure --with-gd -with-png-dir=/usr --with-jpeg-dir=/usr --with-freetype-dir=/usr'

First off, where is the PHP installation directory where I can run this configure? I can't find it anywhere, and intensively searching Google has turned up nothing (some say /usr/src/php, but my FC installation has no php dir in /usr/src).

Secondly, when I run configure, in addition to those gd-specific args listed above, do I need to add the huge amount of options that I see listed for configure in my phpinfo() in my terminal statement? Or can I just add those gd-specific args to some config file and then just plain:

$ ./configure
$ make
$ make install

and be done with it? Or are there more ties that I have to take care of?

Thanks in advance for your help!

PS) Is yum typically grossly unstable/bloated? This is my first experience with Fedora, and it's on a ~1GHz AMD machine, and yum has totally frozen the gui before (and for SOME reason, sshd isn't installed, so I couldn't kill it). When I just tried installing ssh via $ yum install openssh-server, I had to eventually kill it after 1.5 hours, fearing it would freeze the machine again. This particular installation of FC is going to lead to aneurysms, I think.

29th August 2007, 02:24 AM
you could just avoid this mess by installing php-gd from the repos

29th August 2007, 05:42 AM
that.. was way easier. thanks!

# yum install php-gd
# /etc/rc.d/init.d/httpd restart