php.net |  support |  documentation |  report a bug |  advanced search |  search howto |  statistics |  random bug |  login
Bug #45609 Segfault when using pg_pconnect/pg_connect from the CLI
Submitted: 2008-07-23 19:20 UTC Modified: 2008-07-31 01:00 UTC
Votes:4
Avg. Score:4.0 ± 1.0
Reproduced:4 of 4 (100.0%)
Same Version:2 (50.0%)
Same OS:3 (75.0%)
From: tavs_d at hotmail dot com Assigned:
Status: No Feedback Package: Reproducible crash
PHP Version: 5.2.6 OS: Ubuntu 8.04
Private report: No CVE-ID: None
View Developer Edit
Welcome! If you don't have a Git account, you can't do anything here.
If you reported this bug, you can edit this bug over here.
(description)
Block user comment
Status: Assign to:
Package:
Bug Type:
Summary:
From: tavs_d at hotmail dot com
New email:
PHP Version: OS:

 

 [2008-07-23 19:20 UTC] tavs_d at hotmail dot com
Description:
------------
The version reported is incorrect as you have no option for 5.2.4

Kernel: 2.6.24-16-server
PHP version: PHP 5.2.4-2ubuntu5.2 with Suhosin-Patch 0.9.6.2 (cli) (built: Jul  3 2008 16:46:01)

When executing a script from the console which contains pg_connect/pg_pconnect a segmentation fault is encountered.

This error is NOT present when the script is executed through a browser.

Reproduce code:
---------------
<?
$dbconn = pg_connect("host=localhost port=5432 dbname=someName user=someUser password=somePass") or die('Dbconnect failed!');
?>

# Run script
/usr/bin/php -f test.php

Expected result:
----------------
I just expect to connect to the DB

Actual result:
--------------
I actually do connect and can make any DB operation I want but the program is always terminated with a segmentation fault.

Here's a backtrace from GDB:

Core was generated by `/usr/bin/php -f test.php'.
Program terminated with signal 11, Segmentation fault.
[New process 7287]
#0  0xb72ae000 in ?? ()
(gdb) bt
#0  0xb72ae000 in ?? ()
#1  0xb78891bd in ?? () from /usr/lib/i686/cmov/libcrypto.so.0.9.8
#2  0xb788a98a in ERR_free_strings () from /usr/lib/i686/cmov/libcrypto.so.0.9.8
#3  0xb7720487 in ?? () from /usr/lib/libcurl.so.4
#4  0xb77340a0 in ?? () from /usr/lib/libcurl.so.4
#5  0xb7729733 in curl_global_cleanup () from /usr/lib/libcurl.so.4
#6  0xb7743337 in zm_shutdown_curl () from /usr/lib/php5/20060613+lfs/curl.so
#7  0x082c720a in module_destructor ()
#8  0x082cdd75 in ?? ()
#9  0x082ce007 in zend_hash_graceful_reverse_destroy ()
#10 0x082c349c in zend_shutdown ()
#11 0x08278f75 in php_module_shutdown ()
#12 0x0835405d in main ()

Patches

Pull Requests

History

AllCommentsChangesGit/SVN commitsRelated reports
 [2008-07-24 04:16 UTC] tavs_d at hotmail dot com
Thanks for the quick response.

Sorry. I don't have the option of installing anything which is not a package. Guess I have to wait for the Ubuntu community to release an update.
 [2008-07-31 01:00 UTC] php-bugs at lists dot php dot net
No feedback was provided for this bug for over a week, so it is
being suspended automatically. If you are able to provide the
information that was originally requested, please do so and change
the status of the bug back to "Open".
 
PHP Copyright © 2001-2026 The PHP Group
All rights reserved.
Last updated: Tue Oct 06 07:00:02 2026 UTC