#native_company# #native_desc#
#native_cta#

image gd php linux solaris

By Willem
on August 22, 2002

Hello y’all,

Had a bad day for not getting graphs in php. Got angry and a solution, want to share it with y’all, maybe it will help you.

I installed apache and GD 2.0.1 as usual.Then I compiled php against static GD:

1. First lookup libgd.so
locate libgd.so

move it
mv /usr/lib/libgd.so /usr/lib/libgd.so_tmp

2. Check if you have a libgd.a :
locate libgd.a
if you don’t have it, build it according to step 4 and 5 of
http://www.php.net/~rasmus/gd.html

3. Build php
./configure –prefix=/usr –with-apxs=/usr/bin/apxs –with-regex=php –with-config-file-path=/etc/php4/apache –with-oci8=/var/lib/oracle/product/8.1.7 –enable-sigchild –enable-memory-limit –enable-track-vars –with-zlib-dir=/usr –with-gd=/usr –enable-gd-native-ttf –enable-gd-imgstrttf –with-jpeg-dir=/usr –with-png-dir=/usr

make

make install

apachectl restart

Voila!

(Move back the /usr/lib/libgd.so_tmp to /usr/lib/libgd.so)

Worked for me on Debian Linux 2.4.10 and Solaris 8.

Greetz,

plafundum