SitePoint Sponsor

User Tag List

Results 1 to 4 of 4
  1. #1
    SitePoint Zealot
    Join Date
    Dec 2003
    Location
    springfield,IL
    Posts
    102
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)

    Unable to load dynamic library - php_pgsql.dll

    Hello all,
    I am stumped here. I am trying to use PEAR and having problems installing it or making it work.

    On my test machine, I am running PHP 4.3.5
    On my current web host provider it is using PHP 4.3.11 so I am using the closest flavor of PHP so I can write the appropriate codes for my live website and testing the code on my local test site machine.

    My test machine is a Windows XP pro running Apache2
    My live site webhost is running Linux version of Apache

    I installed php 4.3.5 to my windows directory c:\php\php4
    my php.ini file also resides in the same directory.

    In my apache config file, I tell it to look for my php.ini file in my c:\php\php4 directory using this configuration in the httpd.conf file.

    Code:
    <ifdefine php4>
    LoadModule php4_module c:/php/php4/php4apache2.dll
    
    # configure the path to php.ini
    PHPIniDir "C:/php/php4"
    </ifdefine>
    According to my instructions it wants me to run this script from the command line prompt...

    Code:
    c:\php\php4\cli\php.exe c:\scripts\myscript.php
    When I run it, it gives me this message:

    Code:
    PHP Warning:  Unknown(): Unable to load dynamic library 'C:\PHP\extensions\php_pgsql.dll' - The specified module could not be found. in unknown on Line 0 
    Could not open input file c:\scripts\myscript.php
    In my c:\php\php4\php.ini file, I changed
    Code:
    extension_dir = "C:\php\php4\extensions"
    Uncommented
    Code:
    extension=php_pgsql.dll
    The php_pgsql.dll file is in my C:\php\php4\extensions directory

    I changed my environmental windows path to look in the C:\php\php4\ directory.

    I hope this is everything. Can anyone assist on whats going on? I am stumped right now.

    In my error warning when I run the script, I dont know why its pointing to the C:\PHP\extensions\php_pgsql.dll when I already defined where my extension directory in my php.ini file.

    I appreciate in any insight in advance.

    -Chuck

  2. #2
    SitePoint Evangelist ClickHeRe's Avatar
    Join Date
    Mar 2005
    Location
    Ottawa, Canada
    Posts
    580
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)
    pgsql is PostgreSQL, you need to install that database server on your machine to be able to use it. If you aren't gonna use it, comment that line back (#) in your php.ini config file.

    If your provider uses MySQL then install MySQL and uncheck the pdo_mysql.dll line instead.
    David

  3. #3
    SitePoint Wizard siteguru's Avatar
    Join Date
    Oct 2002
    Location
    Scotland
    Posts
    3,629
    Mentioned
    2 Post(s)
    Tagged
    0 Thread(s)
    Quote Originally Posted by ClickHeRe View Post
    If your provider uses MySQL then install MySQL and uncheck the pdo_mysql.dll line instead.
    On PHP v4? I don't think so!

    @imchaz -> have you confirmed that php_pgsql.dll is indeed in the extensions folder? What sometimes also helps is to copy it to the WINDOWS and/or SYSTEM folder. No logical reason why this should work, but it often does.
    Ian Anderson
    www.siteguru.co.uk

  4. #4
    SitePoint Zealot
    Join Date
    Dec 2003
    Location
    springfield,IL
    Posts
    102
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)
    To:ClickHeRe
    Yes, I am not running postgres but running mysql. But your suggestion wont work for me.

    To:SiteGuru
    I did what you suggested and it didnt work.

    But, I was eventually able to get it to run properly.

    What happened in my original PHP4 install I had a main C:\php directory and the php.ini file resided in the C:\windows\system32 directory.

    A few months back I wanted to try to run 2 different versions of PHP. They were php4 and php5. I recreated my directories to look like this:
    C:\php\php4 and C:\php\php5 and unzip the versions accordingly.

    I configured a way so Apache with 2 different services can run PHP4 or PHP5 and point the php.ini file in the C:\php\php4 directory or C:\php\php5 directory respectively.

    Well, it turns out the original install of the php.ini which resided in my c:\windows\system32 directory was my culprit. I removed that php.ini file and now no errors.

    Hope my explanation made sense.

    Thanks again for your input.


Bookmarks

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •