Discount Perfume - Expekt bonuses - Debt Consolidation - Deaf Topics - Find jobs

PDA

View Full Version : Please help with GD library .. how do I activate this thing??


steveallen
May 8th 2006, 5:55 pm
Can anyone help me get GD library up and running?

I run the following:
Apache 1.3.33
MySql 3.23.49
PHP 4.3.4

From the <?php phpinfo(); ?> it says I have GD support 'enabled'. These details are displayed:

GD Support enabled
GD Version bundled (2.0.15 compatible)
FreeType Support enabled
FreeType Linkage with freetype
T1Lib Support enabled
GIF Read Support enabled
JPG Support enabled
PNG Support enabled
WBMP Support enabled
XBM Support enabled

However, when I attempt a basic sample 'GD' script to test it .. just a blank page displays (no error message though).

Is there something further I need to do in the php.ini or http.conf files to activate this thing?

Any help would be appreciated!!

Steve

steveallen
May 8th 2006, 5:56 pm
oops .. forgot to mention ... I am on Mac osx V.4 (Tiger)

Steve

ideas_man
May 9th 2006, 7:33 am
Well if it says its installed in phpinfo() then I don't think there is anything else you need to do. If there was a problem, you would get error messages for undefined functions when you used them.

However, to be thorough, check that the following is uncommented in php.ini:


extension=php_gd.dll


Actually check that you have this .dll in your php installation.

Since you are getting no errors, I would perhaps look first at your script... is it actually outputting anything to the browser? I know you are not seeing anything, but have you written anything in the script to actually output?

That would be my first guess.Using a function like imagepng() will output the image you created to browser.eg.


imagepng($image_handle);


You may also want to send a Content-type header before you output.

Hope this helps :)

ideas_man
May 9th 2006, 7:37 am
I just did a quick search about Mac problems with the GD library and found :


The GD image processing module is a bit trickier, however. The GD libraries are bundled with PHP 4.3, but GD is dependent on a few other libraries: zlib, libjpeg, libpng, and libtiff. You could go through the process of downloading, configuring, and compiling these yourself, but, if you’re using Fink, there’s really no need. Fink automates the installation of dozens of UNIX packages and is extremely easy to work with.


I have no experience with Macs so if this is the problem, I can't help you unfortunately, but perhaps someone else will chip in :) A quick search gave me the section above from :

http://developer.apple.com/internet/opensource/php.html

Hope this helps :)

steveallen
May 9th 2006, 1:30 pm
much appreciated!

tech86
May 11th 2006, 10:19 am
Check phpfreaks.com they have a great guide on it for basic coding