Page 1 of 1

GD library?

Posted: Tue Jun 01, 2004 9:31 am
by kevin7
how can i know if i already hv GD library?
i've install php...

if not where to get it?

Posted: Tue Jun 01, 2004 9:44 am
by pickle
There's a function called [php_man]get_loaded_extensions[/php_man](), which does what it says. The website to download GD can be found on the PHP [php_man]GD[/php_man] page.

Posted: Tue Jun 01, 2004 9:49 am
by kevin7
Fatal error: Call to undefined function: imagecreatetruecolor() in c:\inetpub\wwwroot\upload\thumb.php on line 15

i get this error...
because dun hv GD library installed?
GD library not come with php installer?

Posted: Tue Jun 01, 2004 9:50 am
by kevin7
i using php 4.3.6

Posted: Tue Jun 01, 2004 10:13 am
by mjseaden
That's right, you need to install GD. You can check by calling phpinfo() - I can't remember the exact section you look at, but it's all pretty intuitive.

Mark

Posted: Tue Jun 01, 2004 10:16 am
by pickle
if you can get the GD dll file, there is a function called [php_man]dl[/php_man] which will allow you to dynamically load the extension at runtime.

Posted: Tue Jun 01, 2004 10:26 am
by redmonkey
I assume this is the Windoze installer from the PHP.net download page? and your installing on your local machine?

If so, the installer package doesn't come with any additional extensions. You can download the .zip package which has many extensions and simply extract them somewhere on your drive, then edit your php.ini file to uncomment the extensions you require and also specify the extension directory. Then restart your webserver and all should be good.

Posted: Tue Jun 01, 2004 10:43 am
by kevin7
mjseaden wrote:That's right, you need to install GD. You can check by calling phpinfo() - I can't remember the exact section you look at, but it's all pretty intuitive.

Mark
did u means the error i got is a sign of i don't hv GD lib installed???

Posted: Tue Jun 01, 2004 11:44 am
by pickle
Ya.

Posted: Tue Jun 01, 2004 11:53 am
by kevin7
i check the GD's website... sound complicated...
hmm... can u show me the step?

Posted: Tue Jun 01, 2004 7:04 pm
by kevin7
what version should i download for the GD lib? if i using php 4.3.6???

Posted: Wed Jun 02, 2004 10:38 am
by pickle
Download the latest version - I'm not sure which one it is.

Posted: Wed Jun 02, 2004 11:23 am
by wwwapu
I recommend you do what redmonkey said extension you need is gd2 or something like that. go to http://www.php.net

Posted: Wed Jun 02, 2004 3:34 pm
by dull1554
if its a local server(you have access to php.ini) you may be able to load the extension. if php was installed using the installer then forget it you will have to download and install gd seperatly, but if you installed php from a zip file, you allready have the extension

go to the php.ini file located in you windows root directory(c:\windows, c:\winnt) and uncomment the line

Code: Select all

;extension=php_gd2.dll//remove the semi-colon
then restart the webserver

if apache you can restart it by opening command prompt and type "net stop apache" press enter then type "net start apache" and press enter

hope that helps