php.net |  support |  documentation |  report a bug |  advanced search |  search howto |  statistics |  random bug |  login
Bug #444 Compile succeeds with PostgreSQL 6.1 but not 6.3 (Latest)
Submitted: 1998-06-07 21:30 UTC Modified: 1998-07-18 08:27 UTC
From: james at linuxrocks dot co dot uk Assigned:
Status: Closed Package: Compile Failure
PHP Version: 3.0 Final Release OS: Linux, Slackware 3.4
Private report: No CVE-ID: None
 [1998-06-07 21:30 UTC] james at linuxrocks dot co dot uk
Following an identical procedure PHP fails to compile if referring to the includes for
the latest version of postgreSQL.  Its fine with earlier PostgreSQL versions though...


gcc  -DLINUX=2 -DUSE_HSREGEX -DSERVER_SUBVERSION=\"PHP/3.0\" `./apaci`    \
      -o httpd buildmark.o modules.o modules/standard/libstandard.a modules/php3/libphp3.a main/libmain.a ./os/unix/libos.a ap/libap.a regex/libregex.a  -lm -Lmodules/php3 -L../modules/php3 -lmodphp3 -lgdbm -lm -ldl                 -L/usr/local/pgsql/lib -lpq    
modules/php3/libphp3.a(pgsql.o): In function `php3_pgsql_do_connect':
/root/php-3.0/functions/pgsql.c:248: undefined reference to `PQsetdbLogin'
/root/php-3.0/functions/pgsql.c:274: undefined reference to `PQsetdbLogin'
/root/php-3.0/functions/pgsql.c:321: undefined reference to `PQsetdbLogin'
make[2]: *** [target_static] Error 1

I see no reason why a binary compiled with an earlier version of postgres would fail to 
access a newer posgres database but this may cause a problem I am unaware of...

It's definitely bugging!

Cheers!

Patches

Add a Patch

Pull Requests

Add a Pull Request

History

AllCommentsChangesGit/SVN commitsRelated reports
 [1998-07-18 08:27 UTC] zeev
Looks like you're compiling PHP with a set of PostgreSQL headers from one release (6.3.x) and linking with libraries from another release
(6.1.x).  The libpq library from PostgreSQL 6.3 contains PQsetdbLogin:

15:21 bourbon-ttya6 bourbon:~/php3/cgi> nm /usr/local/pgsql/lib/libpq.a | grep PQsetdbLogin
00000410 T PQsetdbLogin

About PHP compiled using PostgreSQL 6.1 not working with a 6.3 server - that's the PostgreSQL's guys "fault".  It's not really a fault
since I don't think they ever said it's supposed to work - the communications protocol probably changed in both 6.2 and 6.3.
Needing to recompile and relink with the new headers and libraries isn't rare.
 
PHP Copyright © 2001-2024 The PHP Group
All rights reserved.
Last updated: Wed Apr 24 07:01:29 2024 UTC