Adding GD to existing PHP

Emerrill

Registered
Ive installed GD using fink, but I cant figure out how to get PHP to recognize it. Is there a way to change its configuration (to add --with=gd, or whatever) without downloading/recompiling it?

Thanks
 
Unless you need something extra special, I would suggest just download the precompiled binary from http://www.entropy.ch/software/macosx/php/

If you insist on compiling your own module then you have to include the GD library when you compile PHP.

Ex:
'./configure' '--with-apxs2=/usr/local/bin/apache2/bin/apxs' '--with-gd' '--with-zlib-dir=/usr/local/lib/' '--with-jpeg'

of course you also need libpjeg and libpng (and zlib is required by libpng) if you are going to be using JPG and PNG.

I suggest going through the PHP installation guide with a fine toothed comb: http://www.php.net/manual/en/installation.php
 
Fahrvergnuugen said:
Unless you need something extra special, I would suggest just download the precompiled binary from http://www.entropy.ch/software/macosx/php/

If you insist on compiling your own module then you have to include the GD library when you compile PHP.

Ex:


of course you also need libpjeg and libpng (and zlib is required by libpng) if you are going to be using JPG and PNG.

I suggest going through the PHP installation guide with a fine toothed comb: http://www.php.net/manual/en/installation.php

Ive tried that binary, and it says it supports GD, but when i installed it, it didnt recognize gd

thanks
 
I think you are misunderstanding what GD is. GD is required by the image creation functions of PHP, such as imagecreatetruecolor(). I use the entropy binary and it works fine.

run phpinfo() in a script and search for GD. You will see that it is used in the configuration directive. Find again and you will see the table showing the version etc.
 
Fahrvergnuugen said:
I think you are misunderstanding what GD is. GD is required by the image creation functions of PHP, such as imagecreatetruecolor(). I use the entropy binary and it works fine.

run phpinfo() in a script and search for GD. You will see that it is used in the configuration directive. Find again and you will see the table showing the version etc.

I know what GD is, when i install the package, gd is not listed in phpinfo , and gd_info() is unrecognized.
 
Emerrill said:
I know what GD is, when i install the package, gd is not listed in phpinfo , and gd_info() is unrecognized.

Thats why you need to recompile PHP, to add the functions that GD provide into the php binary.
 
Back
Top