php.net |  support |  documentation |  report a bug |  advanced search |  search howto |  statistics |  random bug |  login
Bug #66579 An exception is thrown when BLOB or CLOB types are inserted.
Submitted: 2014-01-26 15:57 UTC Modified: 2014-02-13 18:52 UTC
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 Developer Edit
Welcome! If you don't have a Git account, you can't do anything here.
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 15:57 UTC] josemalonsom at yahoo dot es
Description:
------------
An exception is thrown when BLOB or CLOB types are inserted.

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

The error can be also reproduced with the test file PDO_INFORMIX-1.3.1/tests/fvt_017c.phpt from the source of the PDO_INFORMIX extension.




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

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

  $b_content = "BBBBBBBBBBBBB";
  $c_content = "CCCCCCCCCCCCC";

  $stmt->bindParam(1, $b_content);
  $stmt->bindParam(2, $c_content);

  try {
      $stmt->execute(); // this throws a exception
   } catch (\Exception $e) {
       print $e . "\n";
   }


Expected result:
----------------
The data has to be inserted in both fields.

Actual result:
--------------
exception 'PDOException' with message 'SQLSTATE[HY000]: General error: -9810 [Informix][Informix ODBC Driver][Informix]Smart-large-object error. (SQLExecute[-9810] at /src/pdo-informix-source/PDO_INFORMIX-1.3.1/informix_statement.c:759)'

Patches

Pull Requests

History

AllCommentsChangesGit/SVN commitsRelated reports
 [2014-02-12 11:25 UTC] rahulpriyadarshi@php.net
-Assigned To: +Assigned To: rahulpriyadarshi
 [2014-02-12 11:25 UTC] rahulpriyadarshi@php.net
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 05:19 UTC] rahulpriyadarshi@php.net
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 05:20 UTC] rahulpriyadarshi@php.net
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 05:20 UTC] rahulpriyadarshi@php.net
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 06:40 UTC] rahulpriyadarshi@php.net
Same reply has been posted more then once, Since I was not able to see the comment which I have posted. Sorry for this.
 [2014-02-13 18:52 UTC] josemalonsom at yahoo dot es
-Status: Assigned +Status: Closed
 [2014-02-13 18:52 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-2024 The PHP Group
All rights reserved.
Last updated: Sat Dec 21 12:01:31 2024 UTC