"RG" <MeNotTellingYa.com> wrote in message news:<3f029a69$0$45174$65c69314mercury.nildram.ne t>...function_exists can be misleading with GD functions. If you're running> "RG" <MeNotTellingYa.com> wrote in message
> news:3f0293b4$0$45168$65c69314mercury.nildram.net ...> code.> > I have built an app that uses GD, only after installing it on a few
> > different servers, I have run into a little problem.
> > Is there anyway in PHP to determine which version of GD in running?
> > If there was, I could automate the task instead of having to alter the>> >
> > TIA
> > RG
> Crisis over, function_exists() is the kiddie :)
GD 1.6.2, function_exists (imagecreatetruecolor) evaluates to true.
The function does exist, it just says it requires GD 2.0 to do
There is a function called gd_info that will give you that
information, if you're running PHP 4.3.0. However, the best way I've
found is based on the user contributed notes.
Basically, to use ob_start to buffer the phpinfo results and then use
preg_match to hack the version number out of the resulting HTML.