gpt4 book ai didi

php - XAMPP + PostgreSQL = 错误

转载 作者:可可西里 更新时间:2023-11-01 10:26:59 30 4
gpt4 key购买 nike

我在 Windows 7 机器上安装了 XAMPP 和 PostgreSQL。

我很好地配置了 apache httpd.conf 和 PHP.ini 文件,它们可以正常工作。我取消了 php.ini 文件中“extension php_pgsql.dll”行的注释,并将\php、\php\ext 以及 PostgreSQL\bin 和\lib 目录添加到我的 PATH 变量中。

C:\Program Files\PostgreSQL\9.2\lib;C:\Program Files\PostgreSQL\9.2\bin;C:\xampp\php\ext;C:\Program Files (x86)\PostgreSQL\EnterpriseDB-ApachePHP\php;C:\xampp\php;

我下载了兼容windows的php_pgsql.dll文件,复制到\php\ext下

当我尝试启动 apache 服务器时,出现两个错误:

"The procedure entry point _regexec@20 could not be located in the dynamic link library php5ts.dll."

"PHP Startup: Unable to load dynamic library 'C:\xampp\php\ext\php_pgsql.dll' - The specified procedure could not be found."

因此,这些错误显然不是致命的,这意味着服务器会继续启动并完成启动。另外,如果我在 php.ini 中注释掉“extension php_pgsql.dll”行,错误就会消失。以下是来自 PHP 和 apache 的相关错误日志:

Apache :

[Thu Nov 15 10:48:11.763770 2012] [mpm_winnt:notice] [pid 5420:tid 320] AH00455: Apache/2.4.3 (Win32) OpenSSL/1.0.1c PHP/5.4.7 configured -- resuming normal operations
[Thu Nov 15 10:48:11.763770 2012] [mpm_winnt:notice] [pid 5420:tid 320] AH00456: Server built: Aug 18 2012 12:41:37
[Thu Nov 15 10:48:11.763770 2012] [core:notice] [pid 5420:tid 320] AH00094: Command line: 'c:\\xampp\\apache\\bin\\httpd.exe -d C:/xampp/apache'
[Thu Nov 15 10:48:11.764770 2012] [mpm_winnt:notice] [pid 5420:tid 320] AH00418: Parent: Created child process 5728
[Thu Nov 15 10:48:13.489869 2012] [ssl:warn] [pid 5728:tid 328] AH01873: Init: Session Cache is not configured [hint: SSLSessionCache]
[Thu Nov 15 10:48:16.520042 2012] [mpm_winnt:notice] [pid 5728:tid 328] AH00354: Child: Starting 150 worker threads.

PHP:

[15-Nov-2012 15:48:11 UTC] PHP Warning:  PHP Startup: Unable to load dynamic library 'C:\xampp\php\ext\php_pgsql.dll' - The specified procedure could not be found.

in Unknown on line 0

[15-Nov-2012 15:48:16 UTC] PHP Warning: PHP Startup: Unable to load dynamic library 'C:\xampp\php\ext\php_pgsql.dll' - The specified procedure could not be found.

in Unknown on line 0

我想完成此设置,以便为 PostgeSQL 数据库编写 PHP 接口(interface)。这只是为了好玩,而不是在专业背景下。

最佳答案

尝试 this ,我在 Windows 7(64 位) 上遇到了这个问题,我将 PostgreSQL 服务器安装路径中的 libpq.dll 的完整路径添加到 httpd.conf,问题解决。

关于php - XAMPP + PostgreSQL = 错误,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/13401285/

30 4 0
Copyright 2021 - 2024 cfsdn All Rights Reserved 蜀ICP备2022000587号
广告合作:1813099741@qq.com 6ren.com