php.net |  support |  documentation |  report a bug |  advanced search |  search howto |  statistics |  random bug |  login
Bug #7437 Long memo fields are truncated
Submitted: 2000-10-24 15:22 UTC Modified: 2001-06-21 11:28 UTC
From: norbertoh at hotmail dot com Assigned:
Status: Closed Package: ODBC related
PHP Version: 4.0.3pl1 OS: WindowsNT 4
Private report: No CVE-ID: None
 [2000-10-24 15:22 UTC] norbertoh at hotmail dot com
The php file has the following structure:
<?
	$conn = odbc_connect("tar_CHT", "", "");
	$mapas = odbc_do($conn,"SELECT * FROM Pa?s_Mapas WHERE CStr([ID_Pa?s])=1 ");
?>
...
<? echo odbc_result($mapas,"Codigo_HTML") ?>

Where "tar_CHT" is a system DSN of an Access database, "Pais_Mapas" is a table and "Codigo_HTML" is a memo field. This field sometimes have more than 4K characters.

Working with PHP3:

In PHP3.INI, if i leave the uodbc.defaultlrl parameter in 4096, sometimes the "Codigo_HTML" field is truncated.
I solve the problem changing that value to, for example, 8192.

Working with PHP4:

In PHP.INI, if i change the uodbc.defaultlrl parameter to 8192, the field is still truncated.

Both PHP3.INI and PHP.INI are in the "Winnt" directory.
Other parameters in the .INI files remain with the default values.

Patches

Add a Patch

Pull Requests

Add a Pull Request

History

AllCommentsChangesGit/SVN commitsRelated reports
 [2000-10-26 04:06 UTC] kara@php.net
What does phpinfo() report about the value of defaultlrl?
Does truncation also happen when setting the length with odbc_longreadlen() manually?

 [2000-10-26 10:31 UTC] norbertoh at hotmail dot com
phpinfo() reports: 

Directive: odbc.defaultlrl
Local Value: return up to 4096 bytes
Master Value: return up to 4096 bytes

Setting odbc_longreadlen() solves the problem but, why the PHP.INI has no effect?
 [2001-05-31 11:31 UTC] kalowsky@php.net
this is possibly fixed by the fact that uodbc_ is now just odbc_ in the ini file.  try that on a current release and see if it still occurs please!  
 [2001-06-21 11:28 UTC] kalowsky@php.net
no user feedback.  considered fixed in cvs... if not, please reopen the bug.
 
PHP Copyright © 2001-2024 The PHP Group
All rights reserved.
Last updated: Fri May 17 22:01:31 2024 UTC