php.net |  support |  documentation |  report a bug |  advanced search |  search howto |  statistics |  random bug |  login
Bug #66580 No data is inserted when bindParam is used with PDO::PARAM_LOB in BLOB/CLOB
Submitted: 2014-01-26 17:04 UTC Modified: 2014-02-13 18:53 UTC
Votes:1
Avg. Score:2.0 ± 0.0
Reproduced:0 of 1 (0.0%)
From: josemalonsom at yahoo dot es Assigned: rahulpriyadarshi (profile)
Status: Closed Package: PDO_INFORMIX (PECL)
PHP Version: 5.5.8 OS: Ubuntu/Redhat EL5
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: josemalonsom at yahoo dot es
New email:
PHP Version: OS:

 

 [2014-01-26 17:04 UTC] josemalonsom at yahoo dot es
Description:
------------
No data is inserted when bindParam is used with PDO::PARAM_LOB in BLOB/CLOB types. It works if the BYTE/TEXT types are used instead.

PHP Version: 5.8.8
IBM/Informix-Client SDK Version: 4.10.UC2DE
PDO Informix Version: 1.3.1
S.O.: reproduced in Ubuntu 12.04 and RedHat EL5


Test script:
---------------
  
  // $con has a valid PDO Informix connection
  $con->exec('CREATE TABLE test_lob (test_blob BLOB, test_clob CLOB)');

  $stmt = $con->prepare('INSERT INTO test_lob (test_blob, test_clob) VALUES (?, ?)');

  file_put_contents('/tmp/test_file_1.tmp', 'test content 1');
  file_put_contents('/tmp/test_file_2.tmp', 'test content 2');

  $fp1 = fopen('/tmp/test_file_1.tmp', 'rb');
  $fp2 = fopen('/tmp/test_file_2.tmp', 'rb');

  $stmt->bindParam(1, $fp1, PDO::PARAM_LOB);
  $stmt->bindParam(2, $fp2, PDO::PARAM_LOB);

  $stmt->execute();



Expected result:
----------------
A row has to be inserted with values in the two fields.

Actual result:
--------------
After the execution no row has been inserted. No error is produced.

Patches

Add a Patch

Pull Requests

Add a Pull Request

History

AllCommentsChangesGit/SVN commitsRelated reports
 [2014-02-13 06:30 UTC] rahulpriyadarshi@php.net
-Assigned To: +Assigned To: rahulpriyadarshi
 [2014-02-13 06:30 UTC] rahulpriyadarshi@php.net
Both bug id 66579 and this is same, To resolve this issue You need to create sb space to start using LOB. This is a manual process, please execute following steps to make LOB working-

touch /PATH/TO/SBSAPCE/sbspace (you can give any path where informix has write permission)
chmod 660 /PATH/TO/SBSAPCE/sbspace
onspaces -c -S sbspace -p /PATH/TO/SBSAPCE/sbspace -o 0 -s 2000

onmode -ky (Stop server)
chmod 660 /PATH/TO/ONCONFIG/onconfig

vi /PATH/TO/ONCONFIG/onconfig (search for SBSPACENAME and add sbspace to it eg SBSPACENAME sbspace)

oninit -vy (Start the server)
 [2014-02-13 18:53 UTC] josemalonsom at yahoo dot es
-Status: Assigned +Status: Closed
 [2014-02-13 18:53 UTC] josemalonsom at yahoo dot es
That's right, i had created the sbspace but not had added it to the onconfig file, it is not a bug at all.
Sorry for wasting your time with this.
 
PHP Copyright © 2001-2019 The PHP Group
All rights reserved.
Last updated: Sun Mar 24 07:01:25 2019 UTC