I must be dense. I'm trying to get the php_pgsql.dll to load. In the php.ini I have made the following changes:

  1. Uncommented "extension=php_pgsql.dll";

  2. Changed "extension_dir" to have the reference "C:\PHP\Extensions\";

  3. Placed the php_pgsql.dll file in the "C:\PHP\Extensions\" directory.

Upon executing the relevant page, I get the following error:

PHP Warning: Unable to load dynamic library 'C:\PHP\Extensions\php_pgsql.dll' - The specified procedure could not be found. in Unknown on line 0

I'm not sure what I'm doing wrong. Any hints?

Thanks.

--Brent

    Try copying the extension to your windows\system directory (or winnt\system32 if on NT). If that still doesn't work, try also copying php4ts.dll and libsasl.dll into the system directory along w/needed extensions. Extension directory support seems to be really inconsistent under Windows... (sigh).

    Dave

    ===========================================
    http://badblue.com/helpphp.htm
    Free small footprint web server for Windows

    Share files... get PHP up and running fast

      Dave:

      Thanks for your reply. I added the DLLs to the directories you listed, but still it doesn't work. Is there such a thing as a Windows/Unix switch in the php.ini file that would tell PHP to look for Windows-style directories (i.e., "/" vs "\")?

      It's quite confusing getting this to work. I have done several Web searches looking for clues. While the problem is common enough, there's no single solution to it (that I've found yet).

      --Brent

        It may be worth to check the permissions on your PHP folder, and once set correctly to allow them to propagate or to reset the permissions on child objects.

          a month later

          i've been scratching my head, trying to load these .dlls. i have pretty much the same configuration that you have. did you ever find the info to solve this problem? i am stuck now. i've looked everywhere and read through tons of newsgroups and sites. your help is appreciated

            2 months later

            I'm having exactly the same trouble.
            I've tried 4.0.6 and 4.0.8 and in both cases, when I specify the extensions directory and uncomment an extension in that directory, I get a popup message on the server that says:
            "Unable to load dynamic library 'C:\PHP4\extensions\php_pdf.dll' - The specified module could not be found."

            On client machines it appears as:
            "PHP Warning: Unable to load dynamic library 'C:\PHP4\extensions\php_pdf.dll' - The specified module could not be found. in Unknown on line 0"

            This happens no matter which dll I try to load, and the path in the error message is the exact path they are in.

            It's driving me batty - seems like either there is something I'm missing, or all the latest builds of PHP for Windows are broken.

            I really want to start using php for dynamic creation of images and pdfs, but it looks like I have to look into buying similar solutions for ASP...

            Does anyone have a solution for this?
            Please, I'm desperate!

              a month later

              This can be due to the extension DLL itself failing to load a DLL it is dependant on. You can use the microsoft tool depends.exe to find out which dlls a dll/exe is dependant on. Alternatively, if you have access to a dev environment, you can use the win32 API LoadLibrary to try and load the extension DLL and it should tell you which DLL's can not be found that the extension DLL depends on.

              Make sure all required DLLs are located in places 'known' to windows. The easiest way to do this is to modify the path to include the directories where php DLLs are located (in my case c:\php and c:\php\extensions) and then reboot to make sure it has taken effect.

                The solution is very simple. You should use the php4ts.dll version which comes along with php_pgsql.dll only. I was having the same problem and after I did this, it is working. Thanks to Mark Freeman for suggesting depends.exe. It is really a great tool....

                  yep, I had similar problem (libsasl.dll was in dll directory not in php directly) so the same error message.
                  Thanks Mark for your help

                    2 months later

                    I had a hard time with this as well. It seemed like no matter what I changed in the php.ini file I could not see my dll extensions. I finally started going back to previous versions and that worked for me. I know that someone posted that 4.0.6 didn't work, but It did for me. I couldn't get the same configuration to work with 4.1.1 or 4.1.0. It seems like extensions are broken for 4.1.x

                      2 months later

                      Sridhar,
                      I have been through this hell of the php4ts.dll.
                      When you said to use the version that comes with php_pgsql.dll, can you please specify how exactly?
                      Thanks

                        7 days later

                        yeh! i really need to install gd library for my thesis. deadline is fast approaching. i already configure the php.ini file for the extensions and php_gd.dll already present in the folder. i still got error: "unable to load dy...". can anyone please specify step-by-step the procedures on making these extensions work.

                          Hi,

                          I had the same problem, but I could solve it bij downloading the pdflib from www.pdflib.com. The binded dll in there is 580 KB, while the dll in the php\extension dir is 92 KB. After overwriting the standard dll with the one from pdflib my problem's where solved 🙂

                          (ISS stopped complaining not finding php_pdf.dll)

                            Go to your php.ini file...

                            If you do not require the extensions on your server, remark them all out eg,

                            ;extension=php_iconv.dll
                            ;extension=php_ifx.dll
                            ;extension=php_iisfunc.dll
                            ;extension=php_imap.dll

                            MySQL is default with PHP4 so you don't need the extension for it, nor do you need one for ODBC.

                            Bodgy, but did the trick for me.

                            Mike

                              a month later

                              I slogged through this problem for hours. The trick for me appears to have been to change permissions on the c:\php directory. i explicitly gave full control to "everyone" and also "iwam" and "iusr." redundant? who cares. it's working for me now.

                              another nonstandard config i did was to rightclick the my computer icon to get my system properties, then in the advanced tab, i went into environment variables, then into system variables. there i edited PATH to contain c:\php.

                              good luck to all. i hope your extensions are worth it!

                              bill b

                                19 days later
                                7 days later

                                Okay, I've had some trouble with these extensions. The computer at work is a IIS, php 4.1.2 - I had to use the php_iconv.dll extension.

                                It said the exact same error like you, so I used the depends.exe program on the php_iconv.dll file, and it needed the php4ts.dll and iconv-1.3.dll. Nice google.com and find the missing .dll's. I copied them to %windowsdir% and to the extensions directory. uncommented the ;extension=php_iconv.dll and it feaking worked! 🙂

                                I guess it's the same for every extension for php v4.1.x

                                -wOODYdRN

                                  a month later

                                  Whilst trawling through the net looking for answers to my problem (same as all yours), I found that if you copy the OLD php_mssql.dll over the top of the new one (which is 8kb bigger) it works FIRST TIME with no probs

                                  Hope this helps someone

                                    a month later

                                    Hi,
                                    I encountered the exact same problem while trying to make apache php-enabled. A message box warning me it could not load the php_pdf.dll...
                                    Here is what i did on my machine(Windows2000 with apache 1.3.24,php4.2.1) :
                                    There is a file "php.ini" in "C:\Winnt", the second line of which was "extension=php_pdf.dll". I just commented this line out, and everything went smooth after that.
                                    I am not experienced with php, but when i moved the above-mentioned statement after the "extension_dir=C:\PROGRA~1\APACHE~1\APACHE\CGI-BIN\PHP\EXTENSIONS" line(this denotes the directory of the loadable modules), i didn't get any warning either... I guess maybe every "extension=blah blah blah" statement must be somewhere in the php.ini after the line declaring the directory where the loadable modules reside...
                                    Hope this helps...

                                      a month later

                                      This may sound kind of silly, but I just came across the same error and was not able to solve it until I saw a small file called "index.html". I decided to look in the file and low and behold it contained the error. I deleted the html file and everything worked. Apache was sending the file "index.html" instead of "index.php". I hope this may help someone.

                                      Thanks,


                                      Rob, Senior Engineer.
                                      RadioSoft A Customer Friendly Company
                                      E-Mail : rderr@radiosoft.com <mailto:rderr@radiosoft.com>
                                      Web : www.radiosoft.com
                                      Toll-Free: (888) 723-4695
                                      Phone : (386) 426-2521
                                      Fax : (386) 423-0821

                                        Write a Reply...