问题
I'm trying to install pixelpost on an Apache server on windows. The installer is failing because:
Pixelpost will not run if your PHP installation is not compiled with the GD graphics library.
I've added the following line to php.ini
extension=php_gd2.dll
But I still get the same error message. When I run phpinfo() I don't see any reference to GD, so I guess it really isn't installed. I searched for php_gd2.dll and it's in the ext subfolder of my PHP root dir.
I know nothing about PHP, so be gentle with me.
Update
To answer the questions raised in the comments:
- I restarted Apache after modifying
php.ini php.iniis in the root dir of my PHP installationC:\php\php.ini
回答1:
Following are the steps for any php extension (on MS-Windows):
- Give absolute path (not relative) to extensions directory [use forward slashes (
/) instead of backslashes (\); I'm not too sure whether it's required to end the path with trailing slash.- e.g.:
extension_dir = c:/php5/ext
- e.g.:
- Make sure
phpis referring yourphp.ini, nowphp.inican be inside yourphpinstallation root dir.- If your changes to
php.iniare reflected onphpinfo(), it's OK. If not, please refer toINSTALLfile inphproot dir.
- If your changes to
- Restart
apacheif you're bindingphpas a module toapache
来源:https://stackoverflow.com/questions/4646456/enable-gd-support-in-php