From:             wdierkes at 5dollarwhitebox dot org
Operating system: Redhat EL 3 (i386 and x86_64)
PHP version:      5.2.1
PHP Bug Type:     PostgreSQL related
Bug description:  PQfreemem does not exist prior to Postgresql 7.4

Description:
------------
This is sortof related to a previous bug:

http://bugs.php.net/bug.php?id=33813


However, in that bug report the compile fails due to the 
PQfreemem call.  A patch was submitted to cvs that to check 
for PQfreemem, and if HAVE_PQFREEMEM = 0  use 'efree' 
instead.

As of php-5.2.1 this change seems to have been reverted, and 
systems with Postgresql < 7.4 will fail to load php-pgsql 
with the following error (or similar):

PHP Warning:  PHP Startup: Unable to load dynamic library '/
usr/lib/php/modules/pdo_pgsql.so' - /usr/lib/php/modules/
pdo_pgsql.so: undefined symbol: PQfreemem in Unknown on line 
0
PHP Warning:  PHP Startup: Unable to load dynamic library '/
usr/lib/php/modules/pgsql.so' - /usr/lib/php/modules/
pgsql.so: undefined symbol: PQfreemem in Unknown on line 0



php-5.2.0 source used 'free' rather than PQfreemem.  
Therefore, the following is a proposed patch:

http://5dollarwhitebox.org/tmp/php-5.2.1-PQfreemem.patch





Reproduce code:
---------------
Build php-5.2.1 with '--with-pgsql', install, and run a simple test with
'php -v' in order to load the pgsql.so.

Expected result:
----------------
No errors when loading pgsql.co.

Actual result:
--------------
[EMAIL PROTECTED] ~/]# php -v

PHP Warning:  PHP Startup: Unable to load dynamic library '/
usr/lib/php/modules/pdo_pgsql.so' - /usr/lib/php/modules/
pdo_pgsql.so: undefined symbol: PQfreemem in Unknown on line 0
PHP Warning:  PHP Startup: Unable to load dynamic library '/
usr/lib/php/modules/pgsql.so' - /usr/lib/php/modules/pgsql.so: 
undefined symbol: PQfreemem in Unknown on line 0
PHP 5.2.1 (cli) (built: Feb  8 2007 21:37:29) 
Copyright (c) 1997-2007 The PHP Group
Zend Engine v2.2.0, Copyright (c) 1998-2007 Zend Technologies

-- 
Edit bug report at http://bugs.php.net/?id=40418&edit=1
-- 
Try a CVS snapshot (PHP 4.4): 
http://bugs.php.net/fix.php?id=40418&r=trysnapshot44
Try a CVS snapshot (PHP 5.2): 
http://bugs.php.net/fix.php?id=40418&r=trysnapshot52
Try a CVS snapshot (PHP 6.0): 
http://bugs.php.net/fix.php?id=40418&r=trysnapshot60
Fixed in CVS:                 http://bugs.php.net/fix.php?id=40418&r=fixedcvs
Fixed in release:             
http://bugs.php.net/fix.php?id=40418&r=alreadyfixed
Need backtrace:               http://bugs.php.net/fix.php?id=40418&r=needtrace
Need Reproduce Script:        http://bugs.php.net/fix.php?id=40418&r=needscript
Try newer version:            http://bugs.php.net/fix.php?id=40418&r=oldversion
Not developer issue:          http://bugs.php.net/fix.php?id=40418&r=support
Expected behavior:            http://bugs.php.net/fix.php?id=40418&r=notwrong
Not enough info:              
http://bugs.php.net/fix.php?id=40418&r=notenoughinfo
Submitted twice:              
http://bugs.php.net/fix.php?id=40418&r=submittedtwice
register_globals:             http://bugs.php.net/fix.php?id=40418&r=globals
PHP 3 support discontinued:   http://bugs.php.net/fix.php?id=40418&r=php3
Daylight Savings:             http://bugs.php.net/fix.php?id=40418&r=dst
IIS Stability:                http://bugs.php.net/fix.php?id=40418&r=isapi
Install GNU Sed:              http://bugs.php.net/fix.php?id=40418&r=gnused
Floating point limitations:   http://bugs.php.net/fix.php?id=40418&r=float
No Zend Extensions:           http://bugs.php.net/fix.php?id=40418&r=nozend
MySQL Configuration Error:    http://bugs.php.net/fix.php?id=40418&r=mysqlcfg

Reply via email to