September 17th, 2000, 08:02 PM
I'm trying to compile php with gd support, but when i use gd functions i.e (imagecreate() . PHP says it isn't a valid function...
I'm compiling PHP with the following ..
[root@nano php-4.0.0]# ./configure --with-mysql=/usr/local/mysql
the output is...
checking whether to include GD support... yes (static)
checking for gdImageString16 in -lgd... (cached) no
checking for compress in -lz... (cached) yes
checking for png_info_init in -lpng... (cached) no
checking for gdImageColorResolve in -lgd... (cached) yes
checking for gdImageCreateFromPng in -lgd... (cached) no
checking for gdImageCreateFromGif in -lgd... (cached) no
checking for libjpeg (needed by gd-1.8+)... yes
checking for jpeg_read_header in -ljpeg... (cached) yes
checking for gdImageCreateFromJpeg in -lgd... (cached) no
checking whether to include ttf support... no
...when i compile gd i'm enabling jpeg support and it seems to compile find in /gd-1.8.3. I'm not quite sure what the ./configure output means, all I know is that the functions don't seem to be working. I'm trying to follow the phpbuilder.com tutorial on graphing with php and gd. could someone please help?
September 17th, 2000, 10:30 PM
What does your gd Makefile look like?
September 18th, 2000, 01:12 AM
You should have gd installed prior to running the php configure script. If you happened to installed gd, your path is a non-standard path.
I used --with-gd=/usr/local since my 'gd2copypal' is in /usr/local/bin/gd2copypal and 'libgd.so' is in /usr/local/lib/libgd.so and the PREFIX when I installed gd was "/usr/local".
In case your gd2copypal is in /usr/local/gd-1.8.3/bin/gd2copypal and libgd.so is in /usr/local/gd-1.8.3/lib/libgd.so, then specify --with-gd=/usr/local/gd-1.8.3 and see what happen.
September 18th, 2000, 10:35 AM
A couple months ago I managed to get PHP, gd1.8.3, and FreeType working on FreeBSD 3.4 and 4.0, but it was a difficult procedure. I posted my exact procedure in the PHP annotated manual, at http://www.php.net/manual/ref.image.php (see the post at the bottom by email@example.com).
I'm not saying this is the only way to install gd with PHP, but it's the only way _I_ could get it to work.
freebsd, care to review the post and make any alternate suggestions?
September 18th, 2000, 05:57 PM
i had to dload the gd src & change Makefile line 14 then recompile. add:
CFLAGS=-O -DHAVE_JPEG -DHAVE_LIBTIFF
you could also try recompiling libjpeg.
hope this works it worked for me.