pgsql module causes php to crash when calling pg_last_error

Bug #659554 reported by JamesL
12
This bug affects 1 person
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-pgsql-segfault.patch, so this is probably related to #607646.

Revision history for this message
JamesL (jamesly0n) wrote :
Revision history for this message
James Page (james-page) wrote :

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.

Revision history for this message
James Page (james-page) wrote :

Correct that would be bug 660227.

As these are both related to the same root cause (a regression caused by this patch being applied) I will mark this bug as a duplicate of 660227.

Revision history for this message
James Page (james-page) wrote :

Thank you for taking the time to report this bug and helping to make Ubuntu better. This particular bug has already been reported and is a duplicate of bug 660227, so it is being marked as such. Please look at the other bug report to see if there is any missing information that you can provide, or to see if there is a workaround for the bug. Additionally, any further discussion regarding the bug should occur in the other report. Feel free to continue to report any other bugs you may find.

To post a comment you must log in.
This report contains Public information  
Everyone can see this information.

Other bug subscribers

Remote bug watches

Bug watches keep track of this bug in other bug trackers.