php.net |  support |  documentation |  report a bug |  advanced search |  search howto |  statistics |  random bug |  login
Bug #3941 ifx_create_blob truncates text to approx 1150 chars
Submitted: 2000-03-28 04:04 UTC Modified: 2000-03-28 06:34 UTC
From: jnoe at nomadsoft dot co dot uk Assigned:
Status: Closed Package: Misbehaving function
PHP Version: 3.0.15 OS: AIX 4.1
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.
(description)
Block user comment
Status: Assign to:
Package:
Bug Type:
Summary:
From: jnoe at nomadsoft dot co dot uk
New email:
PHP Version: OS:

 

 [2000-03-28 04:04 UTC] jnoe at nomadsoft dot co dot uk
DESCRIPTION
===========
When adding data of type text to our DB, it gets truncated to approx 1150 chars.  However, it is not just the first textarea (from a web form) that gets truncated, it is the SUM of the text areas.  I.E  we have three text areas, if the first is 1700 chars, only the first 1150 (approx) chars of that will be added, and the last two won't be added at all.  If the sum of all three is only 1000 chars, all will be added without a problem.

We are using Informix 7.1


SAMPLE CODE
===========

...
// Blobs - add to blobidarray for the ifx_query
case 3: $textid = ifx_create_blob(0,0,"$val");
        // NB - even if you change this to
        // ifx_create_blob(1,0,"$val"), it doesn't work
	$blobidarray[] = $textid;
	break;
...
...

// If we're not dealing with a blob, add the newly
// trimmed and formatted string to the insert statement
if ($typeid != 3)
{
	$query = $query . $val . ", ";
}
// Otherwise add a '?' that will relate to the blobidarray
else
{
	$query = $query . "?, ";
}
...
...

$query = chop($query);
// Trim last ,
$query = substr($query, 0, strlen($query) - 1) . ")";

// Run the query
$res = ifx_query($query, $db_conn, $blobidarray);
...


COMPILED OPTIONS
================

--with-informix
--with-xml
--with-apache=/export/oss/apache.new/blah blah
--with-gd=no
(that's all I can remember - sorry!)

PHP3.INI
========
N/A


Patches

Add a Patch

Pull Requests

Add a Pull Request

History

AllCommentsChangesGit/SVN commitsRelated reports
 [2000-03-28 06:34 UTC] jnoe at nomadsoft dot co dot uk
The bug was to do with using GET not POST in the HTML form - nothing to do with PHP at all!
 
PHP Copyright © 2001-2024 The PHP Group
All rights reserved.
Last updated: Thu May 02 07:01:30 2024 UTC