[PGSQL] Postgre 9.1.3 + PHP 5.4 On Windows

Questions about the MySQL, PostgreSQL, and most other databases, as well as using it with PHP can be asked here.

Moderator: General Moderators

Post Reply
alvaro.martin
Forum Newbie
Posts: 2
Joined: Mon Apr 16, 2012 6:47 am

[PGSQL] Postgre 9.1.3 + PHP 5.4 On Windows

Post by alvaro.martin »

Hi All!

Im tryinig to get PHP 5.4 + Postgree 9.1.3 to work together in a windows xp enviroment, but, for the moment, without much success :banghead:.

I have uncomented these two lines inside the php.ini file:
extension=php_pdo_pgsql.dll
extension=php_pgsql.dll

When I try to restart apache, I get two errors windows without error message. In the php error log, i can see these two lines:
[16-Apr-2012 12:00:12 UTC] PHP Warning: PHP Startup: in Unknown on line 0
[16-Apr-2012 12:00:12 UTC] PHP Warning: PHP Startup: in Unknown on line 0

Please, I didnt find any info on this, so any help would be welcomed. Also, If you have this same version combination working, please let me know so I can see if it is possible or not.

Thanks
mikosiko
Forum Regular
Posts: 757
Joined: Wed Jan 13, 2010 7:22 pm

Re: [PGSQL] Postgre 9.1.3 + PHP 5.4 On Windows

Post by mikosiko »

a) Look in your php.ini to which directory the variable extension_dir is pointing and
b) Look in that directory that you have the 2 dll's on it

and of course be sure that you are editing the right php.ini (phpinfo() should tell you which one is the valid one.. in case that you have more than one in your machine)
alvaro.martin
Forum Newbie
Posts: 2
Joined: Mon Apr 16, 2012 6:47 am

Re: [PGSQL] Postgre 9.1.3 + PHP 5.4 On Windows

Post by alvaro.martin »

Thanks, but no luck woth that....

Path to extension_dir is ok, and other extensions are loading fine, its just these pair that raises the error.
Ill post the enabled extensions I have, maybe I missed something somewere...

extension=php_bz2.dll
;extension=php_curl.dll
extension=php_fileinfo.dll
extension=php_gd2.dll
;extension=php_gettext.dll
;extension=php_gmp.dll
;extension=php_intl.dll
;extension=php_imap.dll
;extension=php_interbase.dll
;extension=php_ldap.dll
;extension=php_mbstring.dll
;extension=php_exif.dll ; Must be after mbstring as it depends on it
extension=php_mysql.dll
extension=php_mysqli.dll
;extension=php_oci8.dll ; Use with Oracle 10gR2 Instant Client
;extension=php_oci8_11g.dll ; Use with Oracle 11gR2 Instant Client
;extension=php_openssl.dll
;extension=php_pdo_firebird.dll
;extension=php_pdo_mysql.dll
;extension=php_pdo_oci.dll
;extension=php_pdo_odbc.dll
extension=php_pdo_pgsql.dll
;extension=php_pdo_sqlite.dll
extension=php_pgsql.dll
;extension=php_pspell.dll
;extension=php_shmop.dll
mikosiko
Forum Regular
Posts: 757
Joined: Wed Jan 13, 2010 7:22 pm

Re: [PGSQL] Postgre 9.1.3 + PHP 5.4 On Windows

Post by mikosiko »

well looking your initial post again I see only 2 warnings there, not errors... is apache running or not?.... did you run phpinfo() to see if the extensions were enabled?... if not... did you try enabling one or another individually?
dejavu
Forum Newbie
Posts: 1
Joined: Thu Jun 28, 2012 1:08 pm

Re: [PGSQL] Postgre 9.1.3 + PHP 5.4 On Windows

Post by dejavu »

I registered only to post the solution to this problem that drive me crazy me too...

Add this line to httpd.conf

Code: Select all

LoadFile "C:\Archivos de programa\PostgreSQL\9.1\bin\libpq.dll"
PS: Found on http://www.phpchile.cl/comunidad/viewto ... ?f=28&t=99
Post Reply