PHP 8.4.1 Released!

安装

为启用 PostgreSQL 支持,编译 PHP 时需要 --with-pgsql[=DIR]DIR 是 PostgreSQL 的基本安装目录,默认是 /usr/local/pgsql。如果共享对象模块可用,可以使用 php.ini 中的 extension 指令或者 dl() 函数加载 PostgreSQL 模块。

添加备注

用户贡献的备注 2 notes

up
3
Serjik
15 years ago
On a Windows server, configured with Apache, adding the following line to httpd.conf to load libpq.dll can save you a lot of time :

LoadFile "C:/Program Files/PostgreSQL/8.4/bin/libpq.dll"

Note that you will have to change your folder accordingly to the installation path and version of PostgreSQL you have installed. Also note that having Apache and PostgreSQL on the same server for production environments is not recommended.

Cheers,
Serjik
up
1
sean at cockroachlabs dot com
8 years ago
Starting with PHP 7, on Ubuntu (i.e., 16+), you can run:

`sudo apt-get install php-pgsql`
To Top