[Date Prev][Date Next] [Thread Prev][Thread Next] [Date Index] [Thread Index]

[csmall@eye-net.com.au: pg_pconnect does not work when module is preloaded]



OK,
  I did some bug-hunting to find out why the search page occasionally
  plays up on me.  Well, it appears we have a nasty php4-pgsql bug.
  
  FYI,
--- Forwarded message from Craig Small <csmall@eye-net.com.au> -----
Package: php4-pgsql
Version: 4.0.1pl2-2
Severity: important

I've been slowly going mad tracking down what i thought was a udmsearch
bug, but it appears that there is a serious problem with pg_pconnect
when you preload the pgsql.so module (eg you have it mentioned in
/etc/php4/apache/php.ini)

This was my test script:
<?

  if (($db = pg_pconnect("user=udmsearch dbname=udmsearch")) == NULL) {
      echo "problem with opening<BR>\n";
  }
  $result=pg_exec($db, "SELECT count(*) from stopword");
  echo "Result is ", $result[0], "<BR>";
?>

Sometimes it works, most of the time it doesn't.  This is the error
message you get on the browser:

Warning: PostgreSQL query failed: pqReadData() -- read() failed: errno=9
Bad file descriptor in /debian/home/csmall/public_html/test.php on line 6
Result is 

You can play yourself, the url for the test script is
http://master.debian.org/~csmall/test.php

I made this priority important as pg_pconnect is useless with this bug
and a lot of places will use this instead of pg_connect

-- System Information
Debian Release: woody
Architecture: i386
Kernel: Linux gonzo 2.2.14 #1 Sun Apr 9 08:54:05 EST 2000 i586

Versions of packages php4-pgsql depends on:
ii  libc6                        2.1.3-10    GNU C Library: Shared libraries an
ii  libpgsql2                    7.0-beta5-3 Shared library libpq.so.2 for Post
ii  php4                         4.0.1pl2-2  A server-side, HTML-embedded scrip


----- End forwarded message -----

-- 
Craig Small VK2XLZ  GnuPG:1C1B D893 1418 2AF4 45EE  95CB C76C E5AC 12CA DFA5
Eye-Net Consulting http://www.eye-net.com.au/        <csmall@eye-net.com.au>
MIEEE <csmall@ieee.org>                 Debian developer <csmall@debian.org>



Reply to: