Unable to load dynamic library ...\php_gd2.dll
The following message is generated when a PHP file (or one containing
PHP) is viewed:
Message: Unknown(): Unable to load dynamic library 'C:\Program Files\php-4.3.4.win-32\php_gd2.dll'
- The specified module could not be found.
The actual directory given might vary, notably the version of php may
PHP is looking in the wrong directory for the
In this specific case PHP is looking for the extension library in the
PHP installation directory. However the extensions are installed in a folder
Edit the php.ini file. Find the definition for "extension_dir". It may
be something like:
extension_dir = "C:\Program Files\php-4.3.4-win32"
If it is missing "
\extensions" at the end then add it:
Be aware that the specific PHP installation directory may vary between systems
and that the example shown here assumes version 4.3.4.
extension_dir = "C:\Program Files\php-4.3.4-win32\extensions"
These notes are believed to be correct for PHP 4.3 running
on Windows Server 2003 and may apply to other versions as well.
About the author: Brian Cryer
is a dedicated software developer and webmaster. For his day job he develops websites and desktop applications as well as providing IT services. He moonlights as a technical author and consultant.