mil*_*les 1 php xampp phppgadmin php-pgsql
嗨,我在尝试启动phpPgAdmin时遇到此错误.
您的PHP安装不支持PostgreSQL.您需要使用--with-pgsql configure选项重新编译PHP.
我使用xampp ver 1.7.7,Postgresql 9.2.4 64位和phpPgAdmin 5.1
我已经做了以下事情:
1. open "config.inc.php" found in C:\xampp\phpPgAdmin\conf\ and set "extra_login_security" to false
$conf['extra_login_security'] = false;
2. Find php.ini file, in C: \ xampp \ php \ php.ini,
then look for the line " ; extension = php_pgsql.dll "remove tag ';' it so that the
result was" extension = php_pgsql.dll "
Run Code Online (Sandbox Code Playgroud)
(虽然我发现php.ini-生产和开发所以我取消了它们两者)
3. open c:\xampp\apache\conf\extra\httpd-xampp.conf and in section <IfModule mime_module> add
Alias /phppgadmin "c:/xampp/phpPgAdmin/"
<Directory "c:/xampp/phpPgAdmin">
AllowOverride AuthConfig
Order allow,deny
Allow from all
</Directory>
4. LoadFile “C:/xammp/php/libpq.dll”
Run Code Online (Sandbox Code Playgroud)
但我仍然得到这个错误.有人能帮我吗?
小智 7
我从一开始就写答案,而不是你所尝试的一切都是错的.
xampp启动并运行.
下载phpPgAdmin并将其复制到c:\ xampp\phpPgAdmin
修改配置文件
C:\ XAMPP的\ apache的\的conf \额外\的httpd-xampp.conf
添加像phpMyAdmin部分的phpPgAdmin部分:
Alias /phppgadmin "C:/xampp/phpPgAdmin/"
<Directory "C:/xampp/phpPgAdmin">
AllowOverride AuthConfig
Require all granted
</Directory>
Run Code Online (Sandbox Code Playgroud)
重启apache并进入浏览器
http://127.0.0.1/phppgadmin/
Run Code Online (Sandbox Code Playgroud)
现在您将收到消息:使用--pqsql选项安装php
Postgres安装和配置:
即使你有64位窗口安装postgresql 32bit(这不是一个笑话)
Postgres现已启动并运行
再次修改配置文件
C:\ XAMPP的\ apache的\的conf \额外\的httpd-xampp.conf
添加以下行(在我的例子中,PostgreSQL安装在C:/ xampp/PostgreSQL中):
LoadFile "C:/xampp/PostgreSQL/bin/libpq.dll"
Run Code Online (Sandbox Code Playgroud)
在以下现有线之前
LoadFile "C:/xampp/php/php5ts.dll"
LoadModule php5_module "C:/xampp/php/php5apache2_4.dll"
Run Code Online (Sandbox Code Playgroud)
修改配置文件
C:\ XAMPP\PHP\php.ini中
通过删除';'取消注释以下行
;extension=php_pgsql.dll
Run Code Online (Sandbox Code Playgroud)
重新启动apache并再次在浏览器中输入
http://127.0.0.1/phppgadmin/
Run Code Online (Sandbox Code Playgroud)
它应该工作,它适用于我