pgsql module causes php to crash when calling pg_last_error
Affects | Status | Importance | Assigned to | Milestone | |
---|---|---|---|---|---|
php5 (Ubuntu) |
New
|
Undecided
|
Unassigned |
Bug Description
Binary package hint: php5
My Mediawiki install stopped working on upgrade to Maverick. I eventually tracked this to the function pg_last_error in PHP. Calling this function with a valid connection causes php to silently die. Using GDB on php doesn't do any good, since php appears to have some sort of signal handler and just exits with error code 1, giving no error message. The behaviour in Mediawiki was similar - I couldn't find a log message anywhere indicating what was wrong.
Anyway, on a fresh install of Maverick 64-bit with php5 and postgres installed, the following program (run as postgres user or with valid login details put in):
<?
$c = pg_connect("");
print("hello\n");
pg_last_error($c);
print("world\n");
?>
Exits on the line where pg_last_error is called. Valgrind output is attached. I've currently fixed this by rebuilding the php package without patch php52389-
There is currently an SRU proposed to remove php52389- pgsql-segfault. patch in bug 607646 which looks like it will probably resolve this issue based on the information in the bug description.