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 Add Comment Developer Edit
Anyone can comment on a bug. Have a simpler test case? Does it work for you on a different platform? Let us know!
Just going to say 'Me too!'? Don't clutter the database with that please !
Your email address:
MUST BE VALID
Solve the problem:
44 - 32 = ?
Subscribe to this entry?

 
 [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

Add a Patch

Pull Requests

Add a Pull Request

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-2019 The PHP Group
All rights reserved.
Last updated: Sun Sep 15 18:01:27 2019 UTC