Krzysztof Stachlewski ([EMAIL PROTECTED]) reports a bug with a severity of 1 The lower the number the more severe it is.
Short Description win32 client and bytea column Long Description I have a problem with using bytea column with PHP. I am using Apache 1.3.24 on Windows 2000, PHP 4.2.0 installed as Apache module. PostgreSQL 7.2.1 on Linux (Debian). When trying to manipulate the bytea column I get the following error: pg_exec() query failed: pqReadData() -- read() failed: errno=0 No error The guys from PHP told me this is not a problem with their code, but with postgresql. (I submitted a bug report to php.net) The error message is shown only when the code is runned from PHP on Windows system. Exactly the same code, runned on Linux version of PHP 4.1.2 causes no problems at all. The problem does not appear when the amount of data in the bytea column or data to be inserted into bytea column is small enough. "Small enough" seems to be sth about few hundred bytes. I thought this is a problem with the libpq.dll - the version of the one that shipped with PHP was 7.0.2. I have downloaded the latest source code of Postgres and compiled the 7.2.1 version of the dll. That didn't solve the problem. Sample Code create table bin(id int primary key, dat bytea not null); php code below: <? $connection = pg_connect("your favourite connection string"); $data = base64_encode(str_repeat("example", 1000)); $query = "insert into bin values (1, decode('$data', 'base64'))"); pg_exec($connection, $query) ?> No file was uploaded with this report ---------------------------(end of broadcast)--------------------------- TIP 2: you can get off all lists at once with the unregister command (send "unregister YourEmailAddressHere" to [EMAIL PROTECTED])