|
php.net | support | documentation | report a bug | advanced search | search howto | statistics | random bug | login |
PatchesPull RequestsHistoryAllCommentsChangesGit/SVN commits
[2021-03-03 12:52 UTC] cmb@php.net
-Status: Open
+Status: Feedback
-Assigned To:
+Assigned To: cmb
[2021-03-03 12:52 UTC] cmb@php.net
[2021-03-14 04:22 UTC] pecl-dev at lists dot php dot net
|
|||||||||||||||||||||||||||||||||
Copyright © 2001-2025 The PHP GroupAll rights reserved. |
Last updated: Fri Oct 24 03:00:02 2025 UTC |
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()); } ?>