Tek-Tips is the largest IT community on the Internet today!

Members share and learn making Tek-Tips Forums the best source of peer-reviewed technical information on the Internet!

  • Congratulations Mike Lewis on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

PHP5, Apache 2.2 looking for GD2

Status
Not open for further replies.

campagnolo1

Technical User
Dec 19, 2011
54
US
Greetings,

still fairly new to php I have stumbled upon some very nice code for a shopping cart. This cart has support for images, which I really like. Unfortunately the code makes use of the gd2 library, which does not seem to be included in the PHP5.x release that I'm using. I have searched high and low for answers on how to get the gd2 library installed but have completely failed. Some sites are talking about recompiling php (which I have no clue how to do), others claim to just enable the gd2 extension in the php.ini file (the extension is not listed in php5.x!) and even others say to just copy the extension from a php4.x package into the php folder and then add the extension to the .ini file (that caused my apache to not even start).
Dose anyone have a solution to this? Is there another way of handling images? I'll be happy to post some of the code that handles the images if necessary.

Thanks for your help in advance,

Chris
 
what platform are you using? windows/linux (flavour) etc?
 
I'm using Windows 7 32bit with PHP 5, Apache 2.2 and MySql 5.5.
 
sfaik gd2 is bundled with the php for windows distro. you need just to enable it in your php.ini and then restart your web server.

Code:
extension=php_gd2.dll

if this is not listed (which would be odd) then just add it in the extensions section.

make sure that your extensions_dir is correctly set too.

you don't specify what version of php you are using but if you are using php 5.2 or after then there is a warning on this page that might be useful

 
jpadie,

thanks for your help. Your suggestion is what I kept finding all over the place, but my php.ini did not have the line. I went ahead and removed my PHP installation and then used the installer (something that was suggested not to do but rather use the .zip archive instead)and then the extension showed up in the library and the ini file. All is well now..... ;o)
 
in the past the exe and msi installers were poor and buggy. i think that the php group upped their game a couple of years ago and started producing better quality support for windows installations.
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top