PHP (cli) exits with a segfault if pg_connect() called.
Affects | Status | Importance | Assigned to | Milestone | |
---|---|---|---|---|---|
php5 (Ubuntu) |
Invalid
|
Low
|
Unassigned | ||
Hardy |
Invalid
|
Undecided
|
Unassigned | ||
postgresql-8.3 (Debian) |
Fix Released
|
Unknown
|
|||
postgresql-8.3 (Ubuntu) |
Won't Fix
|
Undecided
|
Unassigned | ||
Hardy |
Fix Released
|
Medium
|
Martin Pitt |
Bug Description
SRU TEST CASE:
* sudo apt-get install postgresql-8.3 php-cli php-curl php-pgsql
* php -r 'pg_connect(
warning: pg_connect(): Unable to connect to PostgreSQL server: fe_sendauth: no password supplied in Command line code on line 1
Segmentation fault (core dumped)
--- Original bug report -------
Binary package hint: php5-cli
test.php:
<?php pg_connect(
output of php test.php:
connected (or not)
SegmetationFault
In short, calling pg_connect() is causing a Segmentation Fault **after** the successful completion of the script. Explicitly calling pg_close() before the script ends has no effect. The function does not need to successfully connect to a db to cause the error. I cannot find a combination of different connection string paramaters that make any difference to the bug.
PHP packages installed
libapache2-mod-php5 5.1.2-1ubuntu3.2
php5-cli 5.1.2-1ubuntu3.2
php5-cgi 5.1.2-1ubuntu3.2
php5-common 5.1.2-1ubuntu3.2
php5-pgsql 5.1.2-1ubuntu3.2
php5-curl 5.1.2-1ubuntu3.2
php5-gd 5.1.2-1ubuntu3.2
php5-imap 5.1.2-1ubuntu3.2
php5-mysql 5.1.2-1ubuntu3.2
php5-mysqli 5.1.2-1ubuntu3.2
php5-xsl 5.1.2-1ubuntu3.2
PostgreSQL packages installed:
postgresql-8.1 8.1.4-0ubuntu1
postgresql-
postgresql-comon1 53ubuntu3
postgresql-
postgresql-
WORKAROUNDS:
1) Removing php5-curl solves the problem
2) Moving the line "extension=curl.so" into pgsql.ini (before or after "extension=
Changed in php5: | |
status: | Unknown → Confirmed |
Changed in php5: | |
importance: | Undecided → Low |
description: | updated |
Changed in postgresql-8.3: | |
status: | New → Confirmed |
Changed in php5: | |
status: | Confirmed → Triaged |
Changed in postgresql-8.3: | |
status: | Confirmed → Triaged |
Changed in postgresql-8.3 (Ubuntu): | |
status: | Triaged → Confirmed |
Changed in postgresql-8.3 (Ubuntu Hardy): | |
status: | Triaged → In Progress |
description: | updated |
description: | updated |
Changed in postgresql-8.3 (Debian): | |
status: | Confirmed → Fix Released |
Thanks for submitting the bug report.
I tested this with php5 5.1.2-1ubuntu3.2 on dapper and could not reproduce this.
Is this problem still current or fixed by the updates ?
Thanks