WAMP上的PostgreSQL集成 [英] Integration of postgreSQL on WAMP

查看:203
本文介绍了WAMP上的PostgreSQL集成的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我刚刚在Windows 7上安装了postgreSQL。我正在尝试将postgreSQL与WAMP服务器集成。
为此,我在httpd.conf和php.ini文件中做了以下更改

I have just installed the postgreSQL on windows 7. I am trying to integrate postgreSQL with WAMP server. For this i have done the following changes in httpd.conf and php.ini file

1 LoadModule c:/ path httpd.conf 中的 libpq.dll ,然后

1 LoadModule c:/path to libpq.dll in httpd.conf and then

2 extension = php_mod_pgsql.dll extension = php_pgsql.dll -enable(删除; )在 php.ini

2 extension=php_mod_pgsql.dll, extension=php_pgsql.dll -- enable(reemove ;) in php.ini

如果执行上述更改,则本地主机不起作用。

If I do the above changes the localhost does not work.

如果我进行第二次更改,则本地主机工作但未加载 libpq.dll

If I do the second changes the localhost work but does not load the libpq.dll.

我是通过php脚本检查了pgsql的

I checked the pgsql by php script by this

<?php
 echo extension_loaded('pgsql') ? 'yes':'no';
 ?>

脚本显示是,但是apache未加载 libpq。 dll
现在我应该如何将postgreSQL加载到Apache2.2 *(沼泽)中

The script shows "yes", but apache is not loading the libpq.dll. Now what i should do for load the postgreSQL into the Apache2.2* (wamp)

推荐答案


  1. 在安装 PostgreSQL 之后,您需要复制 libpq。 dll wamp\bin\php\phpX.XX wamp\bin\apache\ Apache2.2 * \bin 。并重新启动Wampserver。

  2. 下载 phpPgAdmin 此处

  3. C:\wamp\apps 中提取 phpPgAdmin-5.1.zip 将是 C:\wamp\apps\phpPgAdmin-5.1

  4. 创建一个名为<$的文件 C:wamp\alias 中的c $ c> phppgadmin.conf 。然后复制并粘贴以下内容:

  1. After installation of PostgreSQL, you need to copy libpq.dll from wamp\bin\php\phpX.X.X to wamp\bin\apache\Apache2.2*\bin . And restart the Wampserver.
  2. Download phpPgAdmin here.
  3. Extract phpPgAdmin-5.1.zip in C:\wamp\apps So the path will be, C:\wamp\apps\phpPgAdmin-5.1.
  4. Create a file called phppgadmin.conf in C:\wamp\alias. And copy paste the following :


Alias /phppgadmin "C:/wamp/apps/phpPgAdmin-5.1/" 

<Directory "C:/wamp/apps/phpPgAdmin-5.1/">
    Options Indexes FollowSymLinks MultiViews
    AllowOverride all
        Order Deny,Allow
  Allow from all
</Directory>



  • 左键单击Wampserver托盘图标。导航到PHP> PHP扩展。然后启用此

  • Left Click on the Wampserver Tray icon. Navigate to PHP > PHP extension. Then enable this


    a. php_pgsql 
    b. php_pdo_pgsql extension.
    



  • 打开 C:\ \wamp\apps\phpPgAdmin-5.1\conf\config.inc.php

    a。找到 $ conf ['servers'] [0] ['host'] =''; 更改为 $ conf ['servers'] [0 ] ['host'] ='localhost';

    b。找到 $ conf ['extra_login_security'] = true; true 更改为 false

    a. find $conf['servers'][0]['host'] = ''; change to $conf['servers'][0]['host'] = 'localhost';
    b. find $conf['extra_login_security'] = true; change true to false

    重新启动所有服务

    转到 http:// localhost / phppgadmin / 并尝试登录。

    默认登录凭据为


    • 用户名= postgres

    • 密码= root

    引用:


    1. WAMP + PostgreSQL集成

    2. sourceforgenet phpPgAdmin,可通过Wamp for Windows下载

    1. WAMP + PostgreSQL integration
    2. sourceforgenet phpPgAdmin downloadable for Windows with Wamp

    这篇关于WAMP上的PostgreSQL集成的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

  • 查看全文
    登录 关闭
    扫码关注1秒登录
    发送“验证码”获取 | 15天全站免登陆