PostgreSQL query failed: pqReadData() -- read() failed: errno=0

From: "Juliet May" <jmay(at)speark(dot)com>
To: <pgsql-novice(at)postgresql(dot)org>
Subject: PostgreSQL query failed: pqReadData() -- read() failed: errno=0
Date: 2003-01-14 16:35:29
Message-ID: 007401c2bbea$f3c572a0$a1d2a8c0@impsu.net
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: pgsql-novice

I'm at a total loss! My application was running fine and I didn't change
anything and my coworker claims he didn't change anything then I started
getting the following error. I looked through the archives for a similar
problem and found that either a.) I didn't understand what caused the
problem or the solution or b.) My scenario is different than the one
mentioned in the archives. I am running Postgresql 7.2 in a cygwin
environment on an NT machine. I don't want to spend a lot of time
troubleshooting if it is a Windows problem since we are in the process of
setting up a Linux machine to handle Postgresql and PHP. Let me know if you
need more info to help identify the problem. Thanks in advance for any help
you can provide.

Julie

/*Error message on page*/

Warning: PostgreSQL query failed: pqReadData() -- read() failed: errno=0 No
error in c:\php\includes\db_pgsql.inc on line 69
Database error: Invalid SQL: select val from active_sessions where sid =
'0e0460e75e2fc7783b9c991e14e3af9f' and name = 'Agtrac_Session'
PostgreSQL Error: 1 (pqReadData() -- read() failed: errno=0 No error )
Session halted.

/* snippet from db_pgsql.inc including line 69 (marked) below */

function query($Query_String) {
/* No empty queries, please, since PHP4 chokes on them. */
if ($Query_String == "")
/* The empty query string is passed on from the constructor,
* when calling the class without a query, e.g. in situations
* like these: '$db = new DB_Sql_Subclass;'
*/
return 0;

$this->connect();

if ($this->Debug)
printf("<br>Debug: query = %s<br>\n", $Query_String);

/* line 69 */ $this->Query_ID = pg_Exec($this->Link_ID, $Query_String);
$this->Row = 0;

$this->Error = pg_ErrorMessage($this->Link_ID);
$this->Errno = ($this->Error == "")?0:1;
if (!$this->Query_ID) {
$this->halt("Invalid SQL: ".$Query_String);
}

return $this->Query_ID;
}

In response to

Browse pgsql-novice by date

  From Date Subject
Next Message Tom Lane 2003-01-14 16:40:25 Re: FATAL error on launch
Previous Message Paul Gobble 2003-01-14 16:04:55 FATAL error on launch