php.net |  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
Description:
------------
Same as closed Bug #40418 for PHP 5.2.1 (PQfreemem does not exist prior to Postgresql 7.4).
<http://bugs.php.net/bug.php?id=40418>

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 pgsql.so:
"undefined symbol: PQfreemem in Unknown on line 0"

Patches

Pull Requests

History

AllCommentsChangesGit/SVN commitsRelated reports
 [2007-07-02 15:37 UTC] iliaa@php.net
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
http://snaps.php.net/.
 
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 Dec 06 14:01:27 2024 UTC