php.net |  support |  documentation |  report a bug |  advanced search |  search howto |  statistics |  random bug |  login
Bug #72431 Segmentation fault 11
Submitted: 2016-06-16 13:53 UTC Modified: -
Votes:1
Avg. Score:3.0 ± 0.0
Reproduced:0 of 0 (0.0%)
From: attila dot perger at hu dot ibm dot com Assigned:
Status: Open Package: PDO_IBM (PECL)
PHP Version: Irrelevant OS: Mac OS X 10.7
Private report: No CVE-ID: None
View Add Comment Developer Edit
Welcome! If you don't have a Git account, you can't do anything here.
You can add a comment by following this link or if you reported this bug, you can edit this bug over here.
Block user comment
Status: Assign to:
Package:
Bug Type:
Summary:
From: attila dot perger at hu dot ibm dot com
New email:
PHP Version: OS:

 

 [2016-06-16 13:53 UTC] attila dot perger at hu dot ibm dot com
Description:
------------
The driver is loaded ("php -m"and/or "phpinfo()" show it with both versions), But when the code wants to connect to the DB, it fails with segmentation fault 11. The next code has no output at all. I have executed the code with the built in PHP 5.3.15 and with PHP 5.5.33 (build  according to the following page: http://php-osx.liip.ch).

Test script:
---------------
<?php

try {

  $user='??????';
  $password='xxxxxx';
  $connStr1 = "ibm:test01";
  $connStr2 = "ibm:DRIVER={IBM DB2 ODBC DRIVER};HOSTNAME=127.0.0.1;DATABASE=TEST01;";

  $option = array(
    PDO::ATTR_PERSISTENT => TRUE,
    PDO::ATTR_CASE => PDO::CASE_NATURAL,
    PDO::ATTR_ERRMODE => PDO::ERRMODE_EXCEPTION
  );

  $conn = new PDO($connStr1, $user, $password, $option);
  // $conn = new PDO($connStr2, $user, $password); //, $option);

  echo "Connection is established... db: test01, user: aperger" . PHP_EOL;

  $attributes = array(
    "AUTOCOMMIT", "ERRMODE", "CASE", "CLIENT_VERSION", "CONNECTION_STATUS",
    "ORACLE_NULLS", "PERSISTENT", "PREFETCH", "SERVER_INFO", "SERVER_VERSION",
    "TIMEOUT"
  );

  foreach ($attributes as $val) {
    echo "PDO::ATTR_$val: ";
    echo $conn->getAttribute(constant("PDO::ATTR_$val")) . PHP_EOL;
  }

}
catch (Exception $e) {
  ($e->getMessage());
}

?>


Patches

Add a Patch

Pull Requests

Add a Pull Request

 
PHP Copyright © 2001-2019 The PHP Group
All rights reserved.
Last updated: Wed Aug 21 23:01:26 2019 UTC