gd library problems

Need help installing PHP, configuring a script, or configuring a server? Then come on in and post your questions! We'll try to help the best we can!

Moderator: General Moderators

Post Reply
jp50
Forum Newbie
Posts: 7
Joined: Sat Jun 07, 2008 6:19 am

gd library problems

Post by jp50 »

Hi,
I have PHP 5.3.2 running on Windows Server 2003 and trying to run this bit of code:
$im = imagecreate(65,20); I get the error "call to undefined function imagecreate()" I've done a bit of search on the forum and double checked the gd2.dll was enabled on the PHP.ini .
Finally I ran <?phpinfo()?> and got this info about the GD library:

GD Support enabled
GD Version bundled (2.0.34 compatible)
FreeType Support enabled
FreeType Linkage with freetype
FreeType Version 2.1.9
T1Lib Support enabled
GIF Read Support enabled
GIF Create Support enabled
JPG Support enabled
PNG Support enabled
WBMP Support enabled
XBM Support enabled
but when I try to run any gd functions from the code ,the "call to undefined function" error comes up again.
Now I'm lost and don't know what to look at to solve my problem.
Any suggestion would be much appreciated.
Please somebody help
User avatar
Benjamin
Site Administrator
Posts: 6935
Joined: Sun May 19, 2002 10:24 pm

Re: gd library problems

Post by Benjamin »

What's the output of this?

Code: Select all

 
<?php
var_dump(gd_info());
?>
 
jp50
Forum Newbie
Posts: 7
Joined: Sat Jun 07, 2008 6:19 am

Re: gd library problems

Post by jp50 »

If I run the code on normal browser (IE) I get the following:
array(12) { ["GD Version"]=> string(27) "bundled (2.0.34 compatible)" ["FreeType Support"]=> bool(true) ["FreeType Linkage"]=> string(13) "with freetype" ["T1Lib Support"]=> bool(true) ["GIF Read Support"]=> bool(true) ["GIF Create Support"]=> bool(true) ["JPG Support"]=> bool(true) ["PNG Support"]=> bool(true) ["WBMP Support"]=> bool(true) ["XPM Support"]=> bool(false) ["XBM Support"]=> bool(true) ["JIS-mapped Japanese Font Support"]=> bool(false) }
Instead on NuSphere,my PHP editor, I get :
Fatal error: Call to undefined function gd_info() in C:\Inetpub\wwwroot\tutorscript\dump.php on line 2
User avatar
Benjamin
Site Administrator
Posts: 6935
Joined: Sun May 19, 2002 10:24 pm

Re: gd library problems

Post by Benjamin »

The PHP installation your PHP Editor is using does not have the GD library installed.
jp50
Forum Newbie
Posts: 7
Joined: Sat Jun 07, 2008 6:19 am

Re: gd library problems

Post by jp50 »

I think you rright.The issue ,now, is finding the way to activate gd2 on NuSphere.The good part is that the form with the verification image is working on my website.
Thanks for your help.
jp50
Forum Newbie
Posts: 7
Joined: Sat Jun 07, 2008 6:19 am

Re: gd library problems

Post by jp50 »

Problem solved,I edited the php.ini in the NuSphere installation folder,NuSphere/PHPEd,deleting the semicolon before extension=php_gd2.dll
and now it works fine.This is for anyone having this problem.
Post Reply