Page 1 of 1

[PGSQL] Postgre 9.1.3 + PHP 5.4 On Windows

Posted: Mon Apr 16, 2012 7:03 am
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

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

Posted: Mon Apr 16, 2012 10:45 am
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)

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

Posted: Tue Apr 17, 2012 6:14 am
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

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

Posted: Tue Apr 17, 2012 6:28 am
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?

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

Posted: Thu Jun 28, 2012 1:16 pm
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