getting gd2 to load

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
amyhughes
Forum Newbie
Posts: 14
Joined: Fri Apr 13, 2012 7:54 am

getting gd2 to load

Post 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
x_mutatis_mutandis_x
Forum Contributor
Posts: 160
Joined: Tue Apr 17, 2012 12:57 pm

Re: getting gd2 to load

Post 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.
Post Reply