简体   繁体   中英

GD2 library in PHP not installing

I'm having problems installing the GD library. I'm using an IIS server with PHP 5.2.14. I uncommented extension=php_gd2.dll in php.ini.

This is the error:

gd: Unable to initialize module
Module compiled with module API =20060613
PHP compiled with modlule API = 20090626
These options need to match
  in Unknown on Line 0

I downloaded various PHP versions to try and get the correct DLL, including thread-safe 5.2.14. I would then restart my application pool and try to load a file that uses the GD library. Are there other files necessary for gd2 to work? Are there any quick ways to solve this without reinstalling PHP entirely?

first, iis7 was not configured properly for php - I searched for a guide that walked me through. Second the directory was incorrect, whenever I reset the iis server it originally would say one directory when ISAPI api was being used- but after 2 mins it would say extension_dir was in another directory when cgi/fastcgi is being used. So i created that directory that it wanted (which was different than any of my php.ini's). The one it was pulling from needed to be put in the C:/windows directory, but even though I had it set to go to "./ext" it wanted to go to Program files/PHP-- extremely weird. Third, I had to add IUSR to the permissions of any folder being used.

The technical post webpages of this site follow the CC BY-SA 4.0 protocol. If you need to reprint, please indicate the site URL or the original address.Any question please contact:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM