|  support |  documentation |  report a bug |  advanced search |  search howto |  statistics |  random bug |  login
Bug #41845 PHP pgsql Extension does not load with PostgreSQL < 7.4 because of PQfreemem
Submitted: 2007-06-28 18:30 UTC Modified: 2007-07-02 15:37 UTC
From: bilal at revolutionhosting dot net Assigned: iliaa (profile)
Status: Closed Package: PostgreSQL related
PHP Version: 5.2.3 OS: Fedora Core 1, RHEL 3
Private report: No CVE-ID: None
 [2007-06-28 18:30 UTC] bilal at revolutionhosting dot net
Same as closed Bug #40418 for PHP 5.2.1 (PQfreemem does not exist prior to Postgresql 7.4).

This bug exists in PHP 5.2.3.

It seems to have either been never completely fixed in ext/pgsql/pgsql.c, or perhaps reverted in PHP 5.2.3.
The ext/pgsql/config.m4 does now check whether PQfreemem is available, but ext/pgsql/pgsql.c continues to use PQfreemem regardless, causing PHP to be unable to load the pgsql extension on systems with PostgreSQL version less than 7.4 (Fedora Core 1, RHEL 3).

Patch from Bug #40418 should work.

Reproduce code:
Build PHP 5.2.3 with ./configure --with-pgsql=shared
Install and attempt to run PHP (ex. "php -m").

Expected result:
No errors shown, extensions (including "pgsql") listed.

Actual result:
PHP emits a warning that it is unable to load
"undefined symbol: PQfreemem in Unknown on line 0"


Add a Patch

Pull Requests

Add a Pull Request


AllCommentsChangesGit/SVN commitsRelated reports
 [2007-07-02 15:37 UTC]
This bug has been fixed in CVS.

Snapshots of the sources are packaged every three hours; this change
will be in the next snapshot. You can grab the snapshot at
Thank you for the report, and for helping us make PHP better.

PHP Copyright © 2001-2024 The PHP Group
All rights reserved.
Last updated: Fri Jun 14 10:01:35 2024 UTC