|
php.net | support | documentation | report a bug | advanced search | search howto | statistics | random bug | login |
PatchesPull RequestsHistoryAllCommentsChangesGit/SVN commits
[2021-08-19 12:53 UTC] cmb@php.net
-Status: Open
+Status: Feedback
-Assigned To:
+Assigned To: cmb
[2021-08-19 12:53 UTC] cmb@php.net
[2021-08-29 04:22 UTC] pecl-dev at lists dot php dot net
|
|||||||||||||||||||||||||||||||||||||
Copyright © 2001-2025 The PHP GroupAll rights reserved. |
Last updated: Tue Oct 21 23:00:01 2025 UTC |
Description: ------------ I'm using PHP 5.6.14, IBM Informix CSDK 4.10, PDO Informix 1.3.1. Always got Segmentation Error when insert something to table that have TEXT or CLOB datatype. Error from log : [Fri Oct 30 01:08:41.704142 2015] [core:notice] [pid 27963] AH00052: child pid 27967 exit signal Segmentation fault (11) Before that at compile the pdo informix, no error only warnings when run the "make test" command. The warnings are like below : [root@localhost PDO_INFORMIX-1.3.1]# make test Build complete. Don't forget to run 'make test'. PHP Warning: PHP Startup: Unable to load dynamic library '/home/yan/Downloads/PDO_INFORMIX-1.3.1/modules/pdo_informix.so' - /home/yan/Downloads/PDO_INFORMIX-1.3.1/modules/pdo_informix.so: undefined symbol: pdo_parse_params in Unknown on line 0 PHP Warning: PHP Startup: Unable to load dynamic library '/home/yan/Downloads/PDO_INFORMIX-1.3.1/modules/pdo_informix.so' - /home/yan/Downloads/PDO_INFORMIX-1.3.1/modules/pdo_informix.so: undefined symbol: pdo_parse_params in Unknown on line 0 ===================================================================== PHP : /usr/bin/php Warning: PHP Startup: Unable to load dynamic library '/home/yan/Downloads/PDO_INFORMIX-1.3.1/modules/pdo_informix.so' - /home/yan/Downloads/PDO_INFORMIX-1.3.1/modules/pdo_informix.so: undefined symbol: pdo_parse_params in Unknown on line 0 PHP_SAPI : cli PHP_VERSION : 5.6.14 ZEND_VERSION: 2.6.0 PHP_OS : Linux - Linux localhost.localdomain 3.10.0-229.el7.x86_64 #1 SMP Fri Mar 6 11:36:42 UTC 2015 x86_64 INI actual : /home/yan/Downloads/PDO_INFORMIX-1.3.1/tmp-php.ini More .INIs : CWD : /home/yan/Downloads/PDO_INFORMIX-1.3.1 Extra dirs : VALGRIND : Not used ===================================================================== TIME START 2015-10-30 07:58:41 ===================================================================== Test script: --------------- <?php class Test { public $db = null; public $dsn = null; public $user = null; public $pass = null; public function __construct( $_dsn = null , $_user = null , $_pass = null ) { $this->user = "informix"; $this->pass = "informix"; $this->db = "uji_sismak"; $this->svr = "ol_informix1210"; } public function connect($autoCommit=true) { $this->db = new PDO("informix:host=localhost; service=16339; database=". $this->db ."; server=". $this->svr ."; protocol=onsoctcp;EnableScrollableCursors=1", $this->user, $this->pass ); $this->db->setAttribute(PDO::ATTR_ERRMODE, PDO::ERRMODE_EXCEPTION); $this->db->setAttribute(PDO::ATTR_CASE, PDO::CASE_UPPER); $this->db->setAttribute(PDO::ATTR_STRINGIFY_FETCHES, true); return $this->db; } public function runTest() { $this->connect(); try { /* Drop the test table, in case it exists */ $drop = 'DROP TABLE animals'; $result = $this->db->exec( $drop ); } catch( Exception $e ){} try { /* Create the test table */ $server_info = $this->db->getAttribute(PDO::ATTR_SERVER_INFO); $create = 'CREATE TABLE animals (id INTEGER, my_clob CLOB, my_blob byte)'; $res = $this->db->exec( $create ); $stmt = $this->db->prepare('insert into animals (id,my_clob,my_blob) values (:id,:my_clob,:my_blob)'); $clob = "test clob data\n //testing //testing2 "; $blob = "test blob data\n"; print "inserting from php variable<br>"; $stmt->bindValue( ':id' , 0 ); $stmt->bindParam( ':my_clob' , $clob , PDO::PARAM_LOB , strlen($clob) ); $stmt->bindParam( ':my_blob' , $blob , PDO::PARAM_LOB , strlen($blob) ); $stmt->execute(); $stmt = $this->db->prepare( 'select id,my_clob,my_blob from animals' ); $res = $stmt->execute(); $res = $stmt->fetchAll(); var_dump( $clob = "test clob data\n //testing //testing2 ... //test lagi ...dan lagi "; $blob = "test blob data\n"; print "inserting from php variable<br>"; $stmt->bindValue( ':id' , 0 ); $stmt->bindParam( ':my_clob' , $clob , PDO::PARAM_LOB , strlen($clob) ); $stmt->bindParam( ':my_blob' , $blob , PDO::PARAM_LOB , strlen($blob) ); $stmt->execute(); $stmt = $this->db->prepare( 'select id,my_clob,my_blob from animals' ); $res = $stmt->execute(); $res = $stmt->fetchAll(); var_dump( $res ); } catch (Exception $e ) { print $e->getMessage(); } print "done\n"; } } $testcase = new Test(); $testcase->runTest(); ?> Expected result: ---------------- inserting from php variable<br>array(1) { [0]=> array(6) { ["ID"]=> string(1) "0" [0]=> string(1) "0" ["MY_CLOB"]=> string(37) "test clob data //testing //testing2 " [1]=> string(37) "test clob data //testing //testing2 " ["MY_BLOB"]=> string(15) "test blob data " [2]=> string(15) "test blob data " } } inserting from php variable<br>array(1) { [0]=> array(6) { ["ID"]=> string(1) "0" [0]=> string(1) "0" ["MY_CLOB"]=> string(37) "test clob data //testing //testing2 //test lagi ...dan lagi" [1]=> string(37) "test clob data //testing //testing2 //test lagi ...dan lagi" ["MY_BLOB"]=> string(15) "test blob data " [2]=> string(15) "test blob data " } } Actual result: -------------- inserting from php variable<br>array(1) { [0]=> array(6) { ["ID"]=> string(1) "0" [0]=> string(1) "0" ["MY_CLOB"]=> string(37) "test clob data //testing //testing2 " [1]=> string(37) "test clob data //testing //testing2 " ["MY_BLOB"]=> string(15) "test blob data " [2]=> string(15) "test blob data " } } inserting from php variable<br>Segmentation fault (core dumped)