Uploaded to hardy-proposed, waiting for other SRU team member to ack/accept.
** Description changed: + SRU TEST CASE: + * sudo apt-get install postgresql-8.3 + * php -r 'pg_connect("host=localhost");' + 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("dbname=validorinvalidname user=validorinvaliduser pass=validorinvalidpass"); print "connected (or not)\n"; ?> 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-contrib-8.1 8.1.4-0ubuntu1 postgresql-comon1 53ubuntu3 postgresql-client-8.1 8.1.4-0ubuntu1 postgresql-client-common 53ubuntu3 WORKAROUNDS: 1) Removing php5-curl solves the problem 2) Moving the line "extension=curl.so" into pgsql.ini (before or after "extension=pgsql.so", it doesn't matter) solves the problem too, and curl can still be used. ** Description changed: SRU TEST CASE: - * sudo apt-get install postgresql-8.3 - * php -r 'pg_connect("host=localhost");' - 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) + * sudo apt-get install postgresql-8.3 php-cli php-curl php-pgsql + * php -r 'pg_connect("host=localhost");' + 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("dbname=validorinvalidname user=validorinvaliduser pass=validorinvalidpass"); print "connected (or not)\n"; ?> 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-contrib-8.1 8.1.4-0ubuntu1 postgresql-comon1 53ubuntu3 postgresql-client-8.1 8.1.4-0ubuntu1 postgresql-client-common 53ubuntu3 WORKAROUNDS: 1) Removing php5-curl solves the problem 2) Moving the line "extension=curl.so" into pgsql.ini (before or after "extension=pgsql.so", it doesn't matter) solves the problem too, and curl can still be used. -- PHP (cli) exits with a segfault if pg_connect() called. https://bugs.launchpad.net/bugs/63141 You received this bug notification because you are a member of Ubuntu Bugs, which is subscribed to Ubuntu. -- ubuntu-bugs mailing list ubuntu-bugs@lists.ubuntu.com https://lists.ubuntu.com/mailman/listinfo/ubuntu-bugs