Thread

  1. [HACKERS] pg_connect error

    Brian Edginton <edge@aros.net> — 2000-10-18T17:35:13Z

    
    I'm trying to use the php/postgresql interface via my apache server.
    When I try and load a page containing:
    
    <?php $db = pg_connect( "database=mydb owner=me" )
         or die ( "could not connect" ) ?>
    
    (both the database and owner are valid and tested via psql)
    
    apache complains:
    /usr/libexec/ld.so: Undefined symbol "_PQconnectdb" called from httpd:/usr/lib/apache/modules/libphp4.so at 0x4030a394
    
    I have verified through ldconfig that libpq.so.2.0 is being loaded into hints,
    what am I missing?
    
    Thanks,
     edge
    
    
    
    
  2. Re: [HACKERS] pg_connect error

    Travis Bauer <trbauer@indiana.edu> — 2000-10-18T18:28:37Z

    When you compiles php, did you ./configure with --with-pgsql?  If you did
    not compile php explicitly telling it to includ pgsql support, it probably
    didn't.
    
    Travis
    
    Brian Edginton (edge@aros.net) wrote:
    
    > 
    > 
    > I'm trying to use the php/postgresql interface via my apache server.
    > When I try and load a page containing:
    > 
    > <?php $db = pg_connect( "database=mydb owner=me" )
    >      or die ( "could not connect" ) ?>
    > 
    > (both the database and owner are valid and tested via psql)
    > 
    > apache complains:
    > /usr/libexec/ld.so: Undefined symbol "_PQconnectdb" called from httpd:/usr/lib/apache/modules/libphp4.so at 0x4030a394
    > 
    > I have verified through ldconfig that libpq.so.2.0 is being loaded into hints,
    > what am I missing?
    > 
    > Thanks,
    >  edge
    > 
    
    
    
  3. Re: [HACKERS] pg_connect error

    Adam Lang <aalang@rutgersinsurance.com> — 2000-10-18T20:05:50Z

    I don't think that is it.  It has been a while, but I thought if you didn't
    compile php with psql, it returned an "undefined function" error.
    
    By the way... I just found out a little bit ago that the pgsql-php list is
    still alive. :)
    
    Adam Lang
    Systems Engineer
    Rutgers Casualty Insurance Company
    ----- Original Message -----
    From: "Travis Bauer" <trbauer@indiana.edu>
    To: "Brian Edginton" <edge@aros.net>
    Cc: <pgsql-general@postgresql.org>
    Sent: Wednesday, October 18, 2000 2:28 PM
    Subject: Re: [GENERAL] [HACKERS] pg_connect error
    
    
    >
    > When you compiles php, did you ./configure with --with-pgsql?  If you did
    > not compile php explicitly telling it to includ pgsql support, it probably
    > didn't.
    >
    > Travis
    >
    > Brian Edginton (edge@aros.net) wrote:
    >
    > >
    > >
    > > I'm trying to use the php/postgresql interface via my apache server.
    > > When I try and load a page containing:
    > >
    > > <?php $db = pg_connect( "database=mydb owner=me" )
    > >      or die ( "could not connect" ) ?>
    > >
    > > (both the database and owner are valid and tested via psql)
    > >
    > > apache complains:
    > > /usr/libexec/ld.so: Undefined symbol "_PQconnectdb" called from
    httpd:/usr/lib/apache/modules/libphp4.so at 0x4030a394
    > >
    > > I have verified through ldconfig that libpq.so.2.0 is being loaded into
    hints,
    > > what am I missing?
    > >
    > > Thanks,
    > >  edge
    > >
    
    
    
  4. Re: [HACKERS] pg_connect error

    Larry Rosenman <ler@lerctr.org> — 2000-10-19T00:07:03Z

    And, is the postmaster started with -i?
    * Travis Bauer <trbauer@indiana.edu> [001018 13:49]:
    > 
    > When you compiles php, did you ./configure with --with-pgsql?  If you did
    > not compile php explicitly telling it to includ pgsql support, it probably
    > didn't.
    > 
    > Travis
    > 
    > Brian Edginton (edge@aros.net) wrote:
    > 
    > > 
    > > 
    > > I'm trying to use the php/postgresql interface via my apache server.
    > > When I try and load a page containing:
    > > 
    > > <?php $db = pg_connect( "database=mydb owner=me" )
    > >      or die ( "could not connect" ) ?>
    > > 
    > > (both the database and owner are valid and tested via psql)
    > > 
    > > apache complains:
    > > /usr/libexec/ld.so: Undefined symbol "_PQconnectdb" called from httpd:/usr/lib/apache/modules/libphp4.so at 0x4030a394
    > > 
    > > I have verified through ldconfig that libpq.so.2.0 is being loaded into hints,
    > > what am I missing?
    > > 
    > > Thanks,
    > >  edge
    > > 
    
    -- 
    Larry Rosenman                      http://www.lerctr.org/~ler
    Phone: +1 972-414-9812 (voice) Internet: ler@lerctr.org
    US Mail: 1905 Steamboat Springs Drive, Garland, TX 75044-6749
    
    
  5. Re: [HACKERS] pg_connect error

    Brian Edginton <edge@shell.aros.net> — 2000-10-19T02:29:24Z

    Travis Bauer <trbauer@indiana.edu> wrote:
    
    > When you compiles php, did you ./configure with --with-pgsql?  If you did
    > not compile php explicitly telling it to includ pgsql support, it probably
    > didn't.
    
    Yes I did, and postgresql is installed in the default location. Notice that
    the pg_connect from the pgsql module (ext/pgsql) is being executed, it's
    just not finding the PQconnectdb function from the libpq.so library.
    
    > Travis
    
    > Brian Edginton (edge@aros.net) wrote:
    
    >> 
    >> 
    >> I'm trying to use the php/postgresql interface via my apache server.
    >> When I try and load a page containing:
    >> 
    >> <?php $db = pg_connect( "database=mydb owner=me" )
    >>      or die ( "could not connect" ) ?>
    >> 
    >> (both the database and owner are valid and tested via psql)
    >> 
    >> apache complains:
    >> /usr/libexec/ld.so: Undefined symbol "_PQconnectdb" called from httpd:/usr/lib/apache/modules/libphp4.so at 0x4030a394
    >> 
    >> I have verified through ldconfig that libpq.so.2.0 is being loaded into hints,
    >> what am I missing?
    >> 
    >> Thanks,
    >>  edge
    >> 
    
    
    
  6. Re: [HACKERS] pg_connect error

    Brian Edginton <edge@shell.aros.net> — 2000-10-19T02:29:48Z

    Larry Rosenman <ler@lerctr.org> wrote:
    > And, is the postmaster started with -i?
    
    Yup.
    
    
    
  7. Re: [HACKERS] pg_connect error

    Brian Edginton <edge@shell.aros.net> — 2000-10-19T02:30:18Z

    Larry Rosenman <ler@lerctr.org> wrote:
    > And, is the postmaster started with -i?
    
    Yup
    
    
  8. Re: [HACKERS] pg_connect error

    Travis Bauer <trbauer@indiana.edu> — 2000-10-19T03:45:52Z

    I noticed that when I was compiling my copy that if I did not specify 
    the pgsql installation properly, that the ./configure script gave one
    error in the middle of the ./configure output that was easy to 
    miss. At the end, then it gave a warning that did not mention pgsql at all.
    Are you sure that you correctly specified the install directory of the pgsql
    server?  
    
    -- 
    ----------------------------------------------------------------
    Travis Bauer | CS Grad Student | IU |www.cs.indiana.edu/~trbauer
    ----------------------------------------------------------------
    
    Brian Edginton (edge@shell.aros.net) wrote:
    
    > Travis Bauer <trbauer@indiana.edu> wrote:
    > 
    > > When you compiles php, did you ./configure with --with-pgsql?  If you did
    > > not compile php explicitly telling it to includ pgsql support, it probably
    > > didn't.
    > 
    > Yes I did, and postgresql is installed in the default location. Notice that
    > the pg_connect from the pgsql module (ext/pgsql) is being executed, it's
    > just not finding the PQconnectdb function from the libpq.so library.
    > 
    > > Travis
    > 
    > > Brian Edginton (edge@aros.ne