PHP Doku:: Installation - pgsql.installation.html

Verlauf / Chronik / History: (1) anzeigen

Sie sind hier:
Doku-StartseitePHP-HandbuchFunktionsreferenzDatenbankerweiterungenAnbieterspezifische DatenbankerweiterungenPostgreSQLInstallation/KonfigurationInstallation

Ein Service von Reinhard Neidl - Webprogrammierung.

Installation/Konfiguration

<<Anforderungen

Laufzeit-Konfiguration>>

Installation

Um die PostgreSQL-Unterstützung zu aktivieren, müssen Sie PHP mit der Option --with-pgsql[=DIR] kompilieren. DIR ist das Basis-Installationsverzeichnis von PostgreSQL, normalerweise /usr/local/pgsql. Falls das shared-object-Modul verfügbar ist, kann PostgreSQL mit der extension-Directive in der php.ini oder der Funktion dl() geladen werden.


5 BenutzerBeiträge:
- Beiträge aktualisieren...
samuel+php dot net at dionne-riel dot com
13.08.2010 14:31
On PHP 5.3, you may encounter this error.
    Cannot create new link. Too many open links

I did with Archlinux. pgsql.so was active.

To resolve the issue, I had to active pdo.so and pdo_pgsql.so. Hope this helps!
Serjik
28.08.2009 16:54
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
Anto Binish Kaspar
8.07.2009 13:39
An easy way to install in ubuntu(debain)
Just run " apt-get install php5-pgsql "
Riyas
3.06.2009 15:48
If you chose NOT TO replace the newer (>5.2.6) php_pgsql.dll with the old one (from 5.2.5) as mentioned in the note above, then libpq.dll must be available in your PATH.
Also note that the libpq.dll that comes with your installation of PostgreSQL will not work. You have to use the one available here:
http://downloads.php.net/pierre/libpq-php-4.4.9-5.2.6.zip.
Place the extracted dll in your php root directory (where php.exe resides)
Simon
2.03.2009 17:59
Windows users should be mindful that since 5.2.6 it seems that the version of php_pgsql.dll supplied is dynamically linked and requires libpq.dll.

The version supplied in 5.2.5 is statically linked and does not have this dependency, if you cannot load the Postgres extension grab php_pgsql.dll from the 5.2.5 distribution



PHP Powered Diese Seite bei php.net
The PHP manual text and comments are covered by the Creative Commons Attribution 3.0 License © the PHP Documentation Group - Impressum - mail("TO:Reinhard Neidl",...)