Re: [PHPLIB] Postgres closes the channel; missing semicolon? From: Arno A. Karner (karner <email protected>)
Date: 02/29/00

i had problems trying to get phplib working with postgresql, the problem i
found was that gq_fetch_array, and pg_fetch_object caused segfaults. i
rewrote phplibs nextrecord function to behave like one of the other
databases that didnt have fetch_array function, and has been working fine
ever since i did that, it seems that the classes of phplib, give extra
space so the program didnt always casue apache to seg fault, but putting
together a simple page, pg_pconnect, SELECT, pg_fetch_array, always
segfaulted, and browser message returns this page conntains no data

hope this helps

My opinions are my own and not that of my employer even if I am self employed

On Tue, 29 Feb 2000, Peter H. Lemieux wrote:

> I persistently get errors using PHPLIB 6.1 and PostgreSQL 6.4.2 like the
> following:
>
> Database error: Invalid SQL: select val from active_sessions where sid =
> 'f7a87f43986541c11df15faa96ddbe79' and name = 'Poe_Session'
> PostgreSQL Error: 1 (PQexec() -- Request was sent to backend, but backend
> closed
> the channel before responding. This probably means the backend terminated
> abnormally
> before or while processing the request. )
> Session halted.
>
> The only thing I see wrong is the lack of a ";" at the end of the SQL
> query.
> I've added the line:
> $Query_String.=";";
> to the query() function in db_pgsql.inc to append a semicolon. A few tests
> suggest this is the source of the problem, but it's too soon to tell.
> Otherwise,
> PHPLIB works fine. A quick look at the db_pgsql.inc code in PHPLIB-7
> indicates
> that it also leaves off the semicolon.
>
> I've searched the mailing list archive in vain for evidence that anyone but
> me
> has this problem.
>
> PS: I'd appreciate direct replies as I don't keep up with the mailing list.
>
> Thanks!
>
> Peter
> -
> PHP3 Base Library Mailing List. Send messages to <phplib <email protected>>.
> To unsubscribe, send "unsubscribe" to <phplib-request <email protected>> in
> the body, not the subject, of your message.
>

-
PHP3 Base Library Mailing List. Send messages to <phplib <email protected>>.
To unsubscribe, send "unsubscribe" to <phplib-request <email protected>> in
the body, not the subject, of your message.