Page 1 of 1

getting gd2 to load

Posted: Wed Apr 25, 2012 3:27 pm
by amyhughes
Windows Server 2011
extension=php_gd2.dll un-commented in php.ini
apache restarts without error, log file has no recent errors
info.php has no mention of gd2
gd_info() gives error:
Fatal error: Call to undefined function gd_info() in C:\apache2\htdocs\info.php on line 3
windows event logger has no errors I can attribute to apache or php

In short, I have evidence that gd2 is not being loaded but I have no errors to check.

Any clues?

Thanks,
Amy

Re: getting gd2 to load

Posted: Wed Apr 25, 2012 3:57 pm
by x_mutatis_mutandis_x
Make sure you have downloaded the .dll for the right version of PHP you are currently running.
Where is your extension_dir (in php.ini) located? Make sure the .dll file is in that directory (restart apache if necessary).
Also check the path of "php.ini" in your "httpd.conf" file for apache.

After you do all that, call php info for a list of modules loaded:

Code: Select all

phpinfo(INFO_MODULES);
You can also do it in command line:

Code: Select all

$ php -m
You can use the function "extension_loaded()" http://php.net/manual/en/function.extension-loaded.php to programmatically handle the errors and verify if the module got loaded.

Let us know if you still have issues.