#45609 [NEW]: Segfault when using pg_pconnect/pg_connect from the CLI

From: Date: Wed, 23 Jul 2008 19:20:57 +0000
Subject: #45609 [NEW]: Segfault when using pg_pconnect/pg_connect from the CLI
Groups: php.bugs 
Request: Send a blank email to php-bugs+get-127212@lists.php.net to get a copy of this message
From:             tavs_d at hotmail dot com
Operating system: Ubuntu 8.04
PHP version:      5.2.6
PHP Bug Type:     Reproducible crash
Bug description:  Segfault when using pg_pconnect/pg_connect from the CLI

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 ()

-- 
Edit bug report at http://bugs.php.net/?id=45609&edit=1
-- 
Try a CVS snapshot (PHP 5.2): http://bugs.php.net/fix.php?id=45609&r=trysnapshot52
Try a CVS snapshot (PHP 5.3): http://bugs.php.net/fix.php?id=45609&r=trysnapshot53
Try a CVS snapshot (PHP 6.0): http://bugs.php.net/fix.php?id=45609&r=trysnapshot60
Fixed in CVS:                 http://bugs.php.net/fix.php?id=45609&r=fixedcvs
Fixed in release:             http://bugs.php.net/fix.php?id=45609&r=alreadyfixed
Need backtrace:               http://bugs.php.net/fix.php?id=45609&r=needtrace
Need Reproduce Script:        http://bugs.php.net/fix.php?id=45609&r=needscript
Try newer version:            http://bugs.php.net/fix.php?id=45609&r=oldversion
Not developer issue:          http://bugs.php.net/fix.php?id=45609&r=support
Expected behavior:            http://bugs.php.net/fix.php?id=45609&r=notwrong
Not enough info:              http://bugs.php.net/fix.php?id=45609&r=notenoughinfo
Submitted twice:              http://bugs.php.net/fix.php?id=45609&r=submittedtwice
register_globals:             http://bugs.php.net/fix.php?id=45609&r=globals
PHP 4 support discontinued:   http://bugs.php.net/fix.php?id=45609&r=php4
Daylight Savings:             http://bugs.php.net/fix.php?id=45609&r=dst
IIS Stability:                http://bugs.php.net/fix.php?id=45609&r=isapi
Install GNU Sed:              http://bugs.php.net/fix.php?id=45609&r=gnused
Floating point limitations:   http://bugs.php.net/fix.php?id=45609&r=float
No Zend Extensions:           http://bugs.php.net/fix.php?id=45609&r=nozend
MySQL Configuration Error:    http://bugs.php.net/fix.php?id=45609&r=mysqlcfg



Thread (3 messages)

« previous php.bugs (#127212) next »