GD support in PHP 4.3 under Win2K

PHP programming forum. Ask questions or help people concerning PHP code. Don't understand a function? Need help implementing a class? Don't understand a class? Here is where to ask. Remember to do your homework!

Moderator: General Moderators

Post Reply
juddster
Forum Newbie
Posts: 4
Joined: Thu Jan 16, 2003 8:47 am

GD support in PHP 4.3 under Win2K

Post by juddster »

I recetly installed PHP4.3 using the Windows Installer (not the binary files).

As I can't get the ImageCreateFromPNG funtion to work (no output whatsoever) I assume that the installer hasn't included the GD lib.

I've no idea how to check, or how to include it if it hasn't been. Searched the web for clues, but without success.

Any help/advice/pointers much appreciated.
User avatar
twigletmac
Her Royal Site Adminness
Posts: 5371
Joined: Tue Apr 23, 2002 2:21 am
Location: Essex, UK

Post by twigletmac »

The Windows Installer doesn't include any of the extensions like GD, but they are included in the binary version.

Mac
juddster
Forum Newbie
Posts: 4
Joined: Thu Jan 16, 2003 8:47 am

Post by juddster »

how do i install them though?
User avatar
twigletmac
Her Royal Site Adminness
Posts: 5371
Joined: Tue Apr 23, 2002 2:21 am
Location: Essex, UK

Post by twigletmac »

You could install the binary files over the one's installed by the self-installer, just follow the instructions provided with the download:
http://www.php.net/manual/en/install.wi ... ows.manual
That way you'd get all the extensions plus a few other bits and pieces not included in the self-installer.

I figured though that the GD.dll must be available elsewhere (for an easier install) so did a Google search which came up with the following site:
http://elegac.free.fr/commun/telecharge ... stats=true

Mac
User avatar
twigletmac
Her Royal Site Adminness
Posts: 5371
Joined: Tue Apr 23, 2002 2:21 am
Location: Essex, UK

Post by twigletmac »

If you just download the GD.dll make sure that you put it in a folder within your main PHP installation and adjust the value of extension_dir in the php.ini to reflect this location. Then uncomment the GD.dll line in the list of extensions in the php.ini.

Mac
juddster
Forum Newbie
Posts: 4
Joined: Thu Jan 16, 2003 8:47 am

Post by juddster »

Thanks for the replies.

Tried your suggestion earlier, but had problems with the extension_dir setting - whatever I tried, keep getting the "cannot find directory or file" error when restarting Apache.

I'm using Win2K, and have my extensions in C:\PHP\extensions directory - could you tell me what the line in php.ini should be?

; Directory in which the loadable extensions (modules) reside.
extension_dir = ./

The obvious is
extension_dir = C:\php\extensions - this doesn't work for me!
User avatar
twigletmac
Her Royal Site Adminness
Posts: 5371
Joined: Tue Apr 23, 2002 2:21 am
Location: Essex, UK

Post by twigletmac »

Try setting your extension_dir as:

Code: Select all

extension_dir = ./extensions
I remember having to play around with that for a bit to get it to work and our server (Win2K also) seems happy with the above.

Mac
juddster
Forum Newbie
Posts: 4
Joined: Thu Jan 16, 2003 8:47 am

Post by juddster »

hmm, still didn't work.

My PHP.ini is in the C:\WINNT directory, BTW.
User avatar
volka
DevNet Evangelist
Posts: 8391
Joined: Tue May 07, 2002 9:48 am
Location: Berlin, ger

Post by volka »

I set it to the absolute path of the .dll-dir which is currently

Code: Select all

extension_dir = C:/Programme/php423/extensions
Post Reply