Call to undefined function pg_connect() - Wamp

江枫思渺然 提交于 2019-12-01 16:53:33
darhamid
  1. Open php.ini
  2. Find ;extension=php_pgsql.dll and remove the semicolon at the beginning
  3. Find ;extension=php_pdo_pgsql.dll and remove the semicolon at the beginning
  4. Save the file
  5. Restart apache

Hope this helps

i Solve my problem in putting a LoadFile in httpd.conf

LoadFile "location\libpq.dll";

First i uncomment the extension=php_pgsql.dll and extension=php_pdo_pgsql.dll then i put the LoadFile in httpd.conf then restart Apache and Wamp.

Thank you guy's

user2695968

I think this will help you.

  1. Right click on my computer and select properties.
  2. Click on advance system settings
  3. On the system properties window click “environment variables”
  4. Look for system variables frame and click “Path” variable
  5. Click the “edit” button
  6. Change the variable value by adding your php root path. Mine looks like this:
    %SystemRoot%\system32;%SystemRoot%;%SystemRoot%\System32\Wbem;%SYSTEMROOT%\System32\WindowsPowerShell\v1.0\;C:\Program Files\Microsoft SQL Server\100\Tools\Binn\;C:\Program Files\Microsoft SQL Server\100\DTS\Binn\;c:\wamp\bin\php\php5.3.0\
    Just added your php root path at the end.
  7. Restart your wampserver and check mark the pdo_pgsql and php_pgsql extension using the wamp server menu or by editing your php.ini ; just remove the remark for the above extensions.

Copy libpq.dll from php folder (ex.: C:\wamp\bin\php\php5.5.12) to apache bin folder (ex.: C:\wamp\bin\apache\apache2.4.9\bin) then restart apache and be happy!

In case any of that doesnt work, try this in your httpd.conf file under apache...

configure the path to php.ini

PHPIniDir "c:/wamp/bin/php/php5.5.12"

易学教程内所有资源均来自网络或用户发布的内容,如有违反法律规定的内容欢迎反馈
该文章没有解决你所遇到的问题?点击提问,说说你的问题,让更多的人一起探讨吧!