...

View Full Version : Loaded PHP, can't get gd library to work



Local Hero
02-26-2008, 04:26 AM
I spent way to long, but I finally got PHP v5.2.3 running on my Win32 computer. I went to the php.ini file and removed the ; on the extension=php_gd2.dll
I restarted apache, and tried to create a button, the error was:
Fatal error: Call to undefined function imagecreatefrompng()....

My extension_dir = "C:/php/php-5.2.3-Win32/ext" and the php_gd2.dll file is there. I must be missing something

From what I've read online, it would seem that the library isn't installed. When I do a phpinfo(), I don't show any gd library. Is it something that I have to load seperatly? Apart from activating it in the php.ini and having the dll?

I've read 100's of posts and php.net and everyone says it should work, but I can't even show a gd library
Any help or possible ideas are really appreciated

Inigoesdr
02-26-2008, 04:45 AM
Windows doesn't need the library installed; just the extension enabled(which you already did). If the extension were loading you would see the gd section in your phpinfo(), and you would stop seeing those errors. So, check your "Configuration File (php.ini) Path", and "extension_dir" path in your phpinfo() to make sure you are editing the correct file, and the changes have taken effect.

_Aerospace_Eng_
02-26-2008, 04:51 AM
You could have been done in 10 minutes if you had just used an install package which is what you probably should do anyways. It would save you the hassle of install php, apache, and mysql one by one. I recommend XAMPP (http://apachefriends.org/en/xampp.html).

Local Hero
02-26-2008, 01:20 PM
The php.ini file is located in C:/php/php-5.2.3-Win32

In the file I've specified the extension as extension_dir = "C:/php/php-5.2.3-Win32/ext"

In the ext file is the gd library .dll file

When I check the phpinfo it says it should be in C:/php5. THAT'S IT!!!!!!!!!!!

I know I can probably just make a php5 folder but I'd rather know where it is getting that direction and fix it. Any ideas there? By the way. THANKS!!!!

As for the XAMPP, I wasn't aware of that when I started. I think I'll give it a shot on the next computer I try. Thanks

Inigoesdr
02-26-2008, 06:30 PM
When I check the phpinfo it says it should be in C:/php5. THAT'S IT!!!!!!!!!!!
The extension_dir? What is the path for the php.ini that the phpinfo() says it's using?

Local Hero
02-26-2008, 11:25 PM
In the file I've specified the extension as extension_dir = "C:/php/php-5.2.3-Win32/ext"

So somewhere else it's telling it to look for C:/php5 which doesn't exist. Any ideas where it would say that?

Inigoesdr
02-28-2008, 01:56 PM
Any ideas where it would say that?

Yes, probably in the php.ini it's reading from, which should be listed at the top of the phpinfo() page.



EZ Archive Ads Plugin for vBulletin Copyright 2006 Computer Help Forum