php.net |  support |  documentation |  report a bug |  advanced search |  search howto |  statistics |  random bug |  login
Bug #30938 Extra -L arg during probe for postgres function
Submitted: 2004-11-30 00:45 UTC Modified: 2004-12-02 03:24 UTC
From: bgriffin at gracenote dot com Assigned:
Status: Not a bug Package: *Configuration Issues
PHP Version: 4.3.9 OS: linux (Red Hat Linux release 7.1
Private report: No CVE-ID: None
View Add Comment Developer Edit
Welcome! If you don't have a Git account, you can't do anything here.
You can add a comment by following this link or if you reported this bug, you can edit this bug over here.
(description)
Block user comment
Status: Assign to:
Package:
Bug Type:
Summary:
From: bgriffin at gracenote dot com
New email:
PHP Version: OS:

 

 [2004-11-30 00:45 UTC] bgriffin at gracenote dot com
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. 


Patches

Add a Patch

Pull Requests

Add a Pull Request

History

AllCommentsChangesGit/SVN commitsRelated reports
 [2004-12-02 03:24 UTC] sniper@php.net
It is user error to have multiple versions of same libraries hanging around in your system. We can't do anything about it.

 
PHP Copyright © 2001-2024 The PHP Group
All rights reserved.
Last updated: Fri Apr 19 08:01:28 2024 UTC