From: bgriffin at gracenote dot com Operating system: linux (Red Hat Linux release 7.1 PHP version: 4.3.9 PHP Bug Type: *Configuration Issues Bug description: Extra -L arg during probe for postgres function
Description: ------------ I found the problem in configure by looking at helpful comments for bug number 19856. I, too, was wondering why my copy of php was lacking pg_escape_string() even though I had just installed the latest version of Postgres (7.4.6). It turns out that configure, when compling the conftest program to check for PQescapeString(), did this: configure:70469: checking for PQescapeString in -lpq configure:70488: gcc -o conftest -g -O2 -L/usr/lib -ldb-3.1 -Wl,-rpath,/usr//l ib/mysql -L/usr//lib/mysql -L/usr/local/pgsql/lib conftest.c -lpq -lmysqlclient -ldb-3.1 -lgdbm -lresolv -lm -ldl -lnsl 1>&5 There was an old copy of postgres in /usr/lib and that extra -L/usr/lib was causing gcc to favor it. This would be okay if the PHP build favored that, too, since I'd see in the postgres section of phpinfo() that the wrong version had been used. But the real compile of PHP doesn't use -L/usr/lib and finds the correct postgres install, yet wrongly does not include pg_escape_string(). I resolved this for myself by adding a "#define HAVE_PQESCAPE 1" in main/php_config.h by hand. -- Edit bug report at http://bugs.php.net/?id=30938&edit=1 -- Try a CVS snapshot (php4): http://bugs.php.net/fix.php?id=30938&r=trysnapshot4 Try a CVS snapshot (php5.0): http://bugs.php.net/fix.php?id=30938&r=trysnapshot50 Try a CVS snapshot (php5.1): http://bugs.php.net/fix.php?id=30938&r=trysnapshot51 Fixed in CVS: http://bugs.php.net/fix.php?id=30938&r=fixedcvs Fixed in release: http://bugs.php.net/fix.php?id=30938&r=alreadyfixed Need backtrace: http://bugs.php.net/fix.php?id=30938&r=needtrace Need Reproduce Script: http://bugs.php.net/fix.php?id=30938&r=needscript Try newer version: http://bugs.php.net/fix.php?id=30938&r=oldversion Not developer issue: http://bugs.php.net/fix.php?id=30938&r=support Expected behavior: http://bugs.php.net/fix.php?id=30938&r=notwrong Not enough info: http://bugs.php.net/fix.php?id=30938&r=notenoughinfo Submitted twice: http://bugs.php.net/fix.php?id=30938&r=submittedtwice register_globals: http://bugs.php.net/fix.php?id=30938&r=globals PHP 3 support discontinued: http://bugs.php.net/fix.php?id=30938&r=php3 Daylight Savings: http://bugs.php.net/fix.php?id=30938&r=dst IIS Stability: http://bugs.php.net/fix.php?id=30938&r=isapi Install GNU Sed: http://bugs.php.net/fix.php?id=30938&r=gnused Floating point limitations: http://bugs.php.net/fix.php?id=30938&r=float MySQL Configuration Error: http://bugs.php.net/fix.php?id=30938&r=mysqlcfg