php.net |  support |  documentation |  report a bug |  advanced search |  search howto |  statistics |  random bug |  login
Bug #44905 PHP 5.2.6 fails to load PostgreSQL related libraries
Submitted: 2008-05-03 16:09 UTC Modified: 2008-09-09 17:12 UTC
Votes:59
Avg. Score:4.4 ± 1.0
Reproduced:51 of 52 (98.1%)
Same Version:42 (82.4%)
Same OS:24 (47.1%)
From: ionut dot stan at yahoo dot com Assigned: pajoye (profile)
Status: Closed Package: Dynamic loading
PHP Version: 5.2.6 OS: Windows XP professional 64bit
Private report: No CVE-ID: None
 [2008-05-03 16:09 UTC] ionut dot stan at yahoo dot com
Description:
------------
I have just downloaded PHP 5.2.6 and installed it from the zip archive.

Enabling the following in php.ini caused a strange error:

Minimum modifications to php.ini for reproducing:

extension=php_pdo_pgsql.dll
extension=php_pgsql.dll

Error: a pop-up that says:

"php.exe Unable to load component. This application has failed to start because LIBPQ.dll was not found. Re-installing the application may fix the problem."

I then tried PHP 5.2.5, maybe was something with my OS. Aparently this one works, with the same php.ini.

One more try was to replace the .dll-s in the 5.2.6 installation with the ones in 5.2.5. This works too.



Patches

Add a Patch

Pull Requests

Add a Pull Request

History

AllCommentsChangesGit/SVN commitsRelated reports
 [2008-05-04 20:13 UTC] pajoye@php.net
It is due to a little change in the client lib and we did not notice that the extension got linked dynamically. You will be able to use the version from the snaps soon (and profit from the client library version 8.3.1).
 [2008-05-06 13:44 UTC] mvx1nok at gmail dot com
I've the same problem with Windows XP Professional 32bit SP2, downgrade to 5.2.5 could work too.
 [2008-05-06 13:59 UTC] pajoye@php.net
Little update:

Libpq and more generally postgresql 8.3.1 do not support VC6 anymore. As we use it for PHP binaries, we will have to go back to 7.x for 5.2.x.
 [2008-05-13 21:23 UTC] dnd at yandex dot ru
8.3.1 do not support VC6 anymore, while 8.2.7 does support it fine.
 [2008-05-16 18:40 UTC] pajoye@php.net
"8.3.1 do not support VC6 anymore, while 8.2.7 does support it fine."

I got the same error with vc6 than the ones I got using 8.3.1. Linker error and struct redefinitionfo addrinfo and sockaddr_storage.

If you succeeded to compile it using VC6 (or VC2k5:) please let us know how.
 [2008-05-30 10:24 UTC] piotrprz at gmail dot com
For those looking for a workaround:
1. download libpq.dll from http://support.nusphere.com/viewtopic.php?t=4847 and copy it to your php directory
2. copy libeay32.dll to libeay32-0.9.8e.dll
3. copy ssleay32.dll to ssleay32-0.9.8e.dll

I tested it for a while and seems to work fine.
 [2008-05-30 12:14 UTC] pajoye@php.net
The safer work around is to use the php 5.2.5 DLL extension.
 [2008-05-31 07:50 UTC] no at where dot zz
How difficult can it be to test the most basic things, like starting php, before making a release? Good grief. If you can't do the simple things why do you think people should trust you with the complex things?
 [2008-05-31 08:21 UTC] pajoye@php.net
"How difficult can it be to test the most basic things, like starting
php, before making a release? Good grief. If you can't do the simple
things why do you think people should trust you with the complex things?"

How difficult it is to test the RC? How difficult it is to report issues before the stable release instead of waiting the final day?

That being said, we do run php and the tests suite before any release. But as some dlls are in the path, I did not detect that the new version (we upgraded libpq in 5.2.6, different version than with 5.2.5) was not static by default. Given the time we had to pack this release, I'm actually very happy that only this error remains (and have an easy work around).
 [2008-06-03 20:31 UTC] eric at myprojects dot srhost dot info
I have tested on 32bit windows that pgsql extension
could loaded but required download some files from pgsql server 8.3.1 binary.

This can be download from offical site or 
I have packed a small archive that could downloaded.

url:
pgserver offical site download
http://wwwmaster.postgresql.org/download/mirrors-ftp?file=%2Fbinary%2Fv8.3.1%2Fwin32%2Fpostgresql-8.3.1-1-binaries-no-installer.zip

small archive.
http://myprojects.srhost.info/download/php_pgsql_files.zip
 [2008-06-17 07:26 UTC] travisvz at gmail dot com
I have also experienced this problem (Apache 2.2 with PHP 5.2.6 on Windows XP Pro 32-bit). I have found another workaround that may be simpler if your PostgreSQL 8.3 is on the same system as your PHP installation: Simply add your PostgreSQL bin directory ("C:\Program Files\PostgreSQL\8.3\bin" on my system) to your system path. Same effect as copying the necessary libraries to your PHP directory, but perhaps easier to maintain (especially once a fix is found for this problem).
 [2008-06-27 15:17 UTC] kenorb at gmail dot com
Hi,
After installed WAMP 2.0 on Vista and I have the same problem;(
It will be fixed in next version?
 [2008-09-09 17:10 UTC] marcio dot muzzi at gmail dot com
all who want to go back to version 5.2.5, php and using Wamp server, knife download the PHP 5.2.5 addon in www.wampserver.com / en / addons_php.php. Once installed the addon solved this problem with pg_connect
 [2008-09-09 17:12 UTC] pajoye@php.net
Fixed in 5.3.x snaps. 5.2.7 will have the fix as well.

Or you can use the libs from here:
http://downloads.php.net/pierre/libpq-php-4.4.9-5.2.6.zip
 
PHP Copyright © 2001-2019 The PHP Group
All rights reserved.
Last updated: Mon May 27 11:01:28 2019 UTC