WAMP上的PostgreSQL集成 [英] Integration of postgreSQL on WAMP
问题描述
我刚刚在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)
推荐答案
- 在安装 PostgreSQL 之后,您需要复制
libpq。 dll
从wamp\bin\php\phpX.XX
到wamp\bin\apache\ Apache2.2 * \bin
。并重新启动Wampserver。 - 下载 phpPgAdmin 此处
- 在
C:\wamp\apps
中提取 phpPgAdmin-5.1.zip 将是C:\wamp\apps\phpPgAdmin-5.1
。 -
创建一个名为<$的文件
C:wamp\alias
中的c $ c> phppgadmin.conf 。然后复制并粘贴以下内容:
- After installation of PostgreSQL, you need to copy
libpq.dll
fromwamp\bin\php\phpX.X.X
towamp\bin\apache\Apache2.2*\bin
. And restart the Wampserver. - Download phpPgAdmin here.
- Extract phpPgAdmin-5.1.zip in
C:\wamp\apps
So the path will be,C:\wamp\apps\phpPgAdmin-5.1
. Create a file called
phppgadmin.conf
inC:\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
引用:
- WAMP + PostgreSQL integration
- sourceforgenet phpPgAdmin downloadable for Windows with Wamp
这篇关于WAMP上的PostgreSQL集成的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!