Bug #68646 [Nab]: Cannot load pgsql extension
| From: | ab@php.net | Date: | Thu, 25 Dec 2014 15:00:54 +0000 |
| Subject: | Bug #68646 [Nab]: Cannot load pgsql extension | ||
| References: | 1 | Groups: | php.bugs |
| Request: | Send a blank email to php-bugs+get-189197@lists.php.net to get a copy of this message | ||
Edit report at https://bugs.php.net/bug.php?id=68646&edit=1
ID: 68646
Updated by: ab@php.net
Reported by: tony at marston-home dot demon dot co dot uk
Summary: Cannot load pgsql extension
Status: Not a bug
Type: Bug
Package: PostgreSQL related
Operating System: Windows 7
PHP Version: 5.6.4
Block user comment: N
Private report: N
New Comment:
Ok, now as you've mentioned libpq.dll, i probably see what is wrong. It is so, that the
libpq.dll is supplied with PHP. Please use it.
From what i can see, the libpq.dll from the postges distribution is compiled with VC10 while we use
VC11 for PHP 5.5+. It colud be a luck that the method you've described was working at all, but
it's definitely not the right way.
Ah, and seems you was pulling a 32 bit libpq.dll, does that match your php bitness?
Thanks.
Previous Comments:
------------------------------------------------------------------------
[2014-12-25 14:37:44] tony at marston-home dot demon dot co dot uk
I did not change my Apache configuration, nor did I change my postgresql installation. My httpd.conf
file contains the same LoadFile "E:\Program Files (x86)\PostgreSQL\9.2\bin\libpq.dll"
directive that it did with the previous PHP installation. I did not overwrite the php.ini file as
that exists in the C:/windows directory and not the F:/PHP5 directory.
Your reference to me using a different SAPI is incorrect.
My extension_dir setting remains unchanged at F:/php5/ext
I repeat, all I have done is upgrade the files in my F:/PHP5 directory. The pgsql extension no
longer shows up in phpinfo() and is therefore not usable.
------------------------------------------------------------------------
[2014-12-25 11:51:53] ab@php.net
Also, from what i see in the bug #68645 - ext with different SAPI, and - as you told you was doing
an overwrite. That probably something on shouldn't do. Yes, you might be able reuse the php.ini
(but check also), but don't do overwrite - replace the dir. I'd advise you to start from
backing up your old f:\php5 and extracting new fresh zipball, then putting the old/revisited php.ini
in there.
Thanks.
------------------------------------------------------------------------
[2014-12-25 11:44:41] ab@php.net
With this you see that the pgsql ext itself isn't broken. You need to revisit your
configuration under Apache. Please note, that Apache does chroot away from the php dir. So check
what you have on the %path% when Apache starts. Also ensure that php.ini has correct path to the
extension_dir.
Thanks
------------------------------------------------------------------------
[2014-12-25 10:47:46] tony at marston-home dot demon dot co dot uk
This is the output I get from that command:
Microsoft Windows [Version 6.1.7601]
Copyright (c) 2009 Microsoft Corporation. All rights reserved.
F:\PHP5>php -n -d extension_dir=ext -d extension=php_pgsql.dll -m
[PHP Modules]
bcmath
calendar
Core
ctype
date
dom
ereg
filter
ftp
hash
iconv
json
libxml
mcrypt
mhash
mysqlnd
odbc
pcre
PDO
pgsql
Phar
Reflection
session
SimpleXML
SPL
standard
tokenizer
wddx
xml
xmlreader
xmlwriter
zip
zlib
[Zend Modules]
F:\PHP5>
The pgsql extension is still not showing in phpinfo().
------------------------------------------------------------------------
[2014-12-24 17:29:36] ab@php.net
Ok, so this is checked. Please do the following
cd <5.6 folder path>
php -n -d extension_dir=ext -d extension=php_pgsql.dll -m
do you see the pgsql ext loading?
Thanks.
------------------------------------------------------------------------
The remainder of the comments for this report are too long. To view
the rest of the comments, please view the bug report online at
https://bugs.php.net/bug.php?id=68646
--
Edit this bug report at https://bugs.php.net/bug.php?id=68646&edit=1