> Copy 'libpq.dll' to the
> Apache bin directory from the PHP directory
> (/bin/php/ ). The reason for this is because PHP
> is loaded as an Apache module, so any dlls that
> the extensions require need to be copied to the
> Apache bin directory.
>
> 1. Open 'config.inc.php' in any text editor.
> 2. Do a search for '$phpDllToCopy' without the
> single quotes.
> 3. Add the following at the end of the line that
> was found in step 2, exactly as written:
> 'libpq.dll',
> --- The edited line should look like the
> following: $phpDllToCopy = array ( 'libpq.dll',
> 4. Save 'config.inc.php' and refresh WampServer.
源文档 <http://www.wampserver.com/phorum/read.php?2,40270,40311>
这是网上的解决方案
首先将php目录下的libpq.dll文件复制到apache的bin目录下
然后修改config.inc.php的文件在$phpDllToCopy数组中加入libpq.dll这一项
重启后人就没有将pgsql模块加载成功!
于是再将libpg.dll文件复制到系统盘的windows/system32目录下重新启动wamper
加载成功
这里libpg.dll文件是8.3的版本,之前在网上下载了一个7点几的版本不行,
原来用wamper安装后在php的安装目录就有匹配的版本了不要去下载了,直接复制过去!
测试一下
echo extension_loaded('pgsql');
输出为1则加载成功了!
注: 如果还不行则检查一下确认php.ini文件是否启用了postgresql这一项,将:extension=php_pgsql.dll前面的引号去掉!在试试!