Need help using GD library. I have no experience installing, compiling, or configuring PHP - a friend did it for me several years ago, so bear with me as I fumble around in the dark. I read what I could find online about GD and attempted to follow instructions. Here's what I did:

I'm using Win 2000.
I have "php_gd2.dll" sitting in c:\php\ext with the other DLL's.

I edited c:\php\php.ini to uncomment the line "extension=php_gd2.dll".
I also set "extension_dir = c:/php/ext".
I then rebooted my computer, and got a dialogue box with the message something like
"Unable to load c:/php/ext/php_gd2.dll - the procedure cannot be found"

I tried the extension_dir with both forward and backward slashes. Nothing works. Please help. Thanks.

    Which PHP version do you have and which web server (IIS, Apache....) ? That error message means either that the php_gd2.dll doesn't match the php version or that a library that it depends on is missing or that a conflicting dll is in one of the PATH directories.

      I have PHP version 5.0.4, server is Apache 2.0.

      Connie

        Please check if php5ts.dll is in \windows\system32. If that file exists then make sure that it is the same as the one in c:\php.
        If it doesn't exist then add c:\php to the PATH environment variable and restart the computer.

          Thank you for your suggestions. I tried both - changed the path and also put an identical copy of the .dll in \WINNT\system32. I'm still getting the same message. the exact wording is "unable to load dynamic link library 'c:\php\ext\php_gd2.dll - the specified procedure could not be found.' Any other thoughts?

            tsinka wrote:

            Please check if php5ts.dll is in \windows\system32.

            If there are any PHP-releated files in that directory, then they should be deleted. Also, php5ts.dll has nothing to do with loading the GD library (though it is indeed a DLL problem).

            Connie Goss wrote:

            put an identical copy of the .dll in \WINNT\system32.

            See my comment above (PHP-related files should never be moved outside of the main PHP directory).

            What you need to do is add the PHP directory to your system's PATH environment variable. This is a vital step and is listed in the manual's instructions: [man]install.windows.manual[/man].

              Thank you. I have removed the copy of the php5ts.dll from the winnt\system32. I have also added c:\php to my path. I still get the same error message ( unable to load dynamic link library 'c:\php\ext\php_hd2.dll - the specified procedure could not be found.' . Actually, when I re-boot, this error message appears twice. Any more ideas for me? Could I have the wrong version of the .dll?

              Thank you in advance!
              Connie

                Connie Goss wrote:

                Could I have the wrong version of the .dll?

                It's quite possible. Try downloading the zip package from php.net and upgrade your PHP installation (replacing all files except your php.ini file).

                Also verify that c:\php\ext\php_gd2.dll actually exists. Also, did you reboot your entire computer after adding the PHP directory to the PATH variable?

                  Write a Reply...