ID:               43823
 Comment by:       jfolkins at gmail dot com
 Reported By:      andreas dot meinl at gmx dot de
 Status:           Feedback
 Bug Type:         PDO related
 Operating System: Ubuntu 7.10, AMD64
 PHP Version:      5.2.5
 New Comment:

Description:

I wanted to add a piece to this puzzle that may be helpful. Though I am
not using PDO, I am using pg_connect() to connect to my PostgreSQL
database.

Machines: 
----------------------------
1) Dell p4 3.2gz 1gb RAM, Ubuntu 7.10 x86, PHP 5.2.3, PostgreSQL 8.2.5

2) AMD64 X2 3800+ 1GB RAM, Ubuntu 7.10 x86, PHP 5.2.3, PostgreSQL
8.2.5

Script:
----------------------------
<?php

$host   = "localhost";
$port   = "xxx";
$dbname = "xxx";
$user   = "xxx";
$pass   = "xxx";

$dbtest = pg_connect("host=$host port=$port dbname=$dbname user=$user
password=$pass");

if (!$dbtest) { 
echo "Connection Failed\n";
pg_close($dbctest);
} else { 
echo "Connection Successful\n";
pg_close($dbtest);
} 
echo phpversion()."\n";

?>
Expected Results:
----------------------------

I expect the word "Successful" to be displayed along with the version
number of php on this machine.

Results:
----------------------------

[EMAIL PROTECTED]:/dial/app/db$ php db_test.php
Connection Successful
5.2.3-1ubuntu6.2
Segmentation fault (core dumped)
[EMAIL PROTECTED]:/dial/app/db$ 

Additional Notes:
----------------------------

I get the same results on both machines.

I also wanted to add that I have scripts that input data into the
database. These sciprts DO indeed work. But, I always get the
"Segmentation fault (core dumped)" at the end of every script that
connects to the postgreSQL database.


Previous Comments:
------------------------------------------------------------------------

[2008-01-12 15:25:06] [EMAIL PROTECTED]

Please try using this CVS snapshot:

  http://snaps.php.net/php5.2-latest.tar.gz
 
For Windows (zip):
 
  http://snaps.php.net/win32/php5.2-win32-latest.zip

For Windows (installer):

  http://snaps.php.net/win32/php5.2-win32-installer-latest.msi



------------------------------------------------------------------------

[2008-01-11 21:17:35] andreas dot meinl at gmx dot de

Description:
------------
When I use PDO to connect to my PostgreSQL database, I get a
segmentation fault at the end of my PHP script.

Ubuntu 7.10, AMD64, PHP 5.2.3, PostgreSQL 8.2.5

Reproduce code:
---------------
<?php

$hostname = 'localhost';
$dbname = 'xxx';
$username = 'xxx';
$password = 'xxx';

$db = new PDO('pgsql:host=' . $hostname . ';dbname=' . $dbname,
$username, $password);

?>

Expected result:
----------------
I expect nothing, no single line of text.

Actual result:
--------------
[EMAIL PROTECTED]:/tmp$ php ./test.php
Segmentation fault (core dumped)
[EMAIL PROTECTED]:/tmp$


------------------------------------------------------------------------


-- 
Edit this bug report at http://bugs.php.net/?id=43823&edit=1

Reply via email to