php.net |  support |  documentation |  report a bug |  advanced search |  search howto |  statistics |  random bug |  login
Bug #10030 field returned from odbc read with only 3989 chars, not all
Submitted: 2001-03-27 14:27 UTC Modified: 2001-06-21 11:25 UTC
From: gordonl at tts-sf dot com Assigned:
Status: Closed Package: ODBC related
PHP Version: 4.0.3pl1 OS: mandrake linux 2.2
Private report: No CVE-ID: None
 [2001-03-27 14:27 UTC] gordonl at tts-sf dot com
We have an informix database, with the informix odbc driver(7.x) compiled with apache.3.1.14ssl, php 4.03.pl1. 
Our configure commands included the informix via "  --with-custom-odbc=/opt/informix  ". We do not use any of the informix ifx functions, but the php odbc functions. The code in question is as follows:
--------------------------------
  $crs = odbc_pconnect($host,$dblogonname,$dbpassword);
  $i = odbc_exec($crs,"set role " . $dbrole);
  $sqltxt = "select mt_id,mt_name,mt_faxattachments,mt_emlattachments, mt_text,mt_bcc, mt_faxcoverpage,mt_subject from  mail_templates where mt_id = " . $id;
  //echo("sql " . $sqlTxt . "sql");
  $rsm = odbc_exec($crs,$sqltxt);
  $rsma = odbc_fetch_row($rsm);
  $mtid = odbc_result($rsm,1);     //int
  $mtname = odbc_result($rsm,2);  // string 20
  $mtfaxattachments = odbc_result($rsm,3); // string 255
  $mtemlattachments = odbc_result($rsm,4);  // string 255
  $mttext = odbc_result($rsm,5); // text (blob)
  $mtbcc = odbc_result($rsm,6); // string 255
  $mtfaxcoverpage = odbc_result($rsm,7);   // char 8
  $mtsubject = odbc_result($rsm,8);  // char 80
  //echo("sql " . $mttext . "sql");
---------------------------------------------------
Through a data base editor, the mt_text field actually had approximately 4100 characters, but the echo command  just above only displayed the first 3989 chars. Our c++ programmer can access the full field in his programs.

Patches

Add a Patch

Pull Requests

Add a Pull Request

History

AllCommentsChangesGit/SVN commitsRelated reports
 [2001-06-01 12:10 UTC] kalowsky@php.net
try updating your php.ini value defaultlrl to handle the full size and see if that works for you.

next check to see if this still exists in latest versions of PHP, thanks!
 [2001-06-21 11:25 UTC] kalowsky@php.net
no user feedback.
 
PHP Copyright © 2001-2024 The PHP Group
All rights reserved.
Last updated: Thu Apr 25 14:01:31 2024 UTC