php.net |  support |  documentation |  report a bug |  advanced search |  search howto |  statistics |  random bug |  login
Bug #14665 ifx_fetch_row returns string non-zero terminated for selected LVARCHAR fields
Submitted: 2001-12-22 22:48 UTC Modified: 2002-11-21 17:05 UTC
Votes:2
Avg. Score:5.0 ± 0.0
Reproduced:1 of 1 (100.0%)
Same Version:0 (0.0%)
Same OS:0 (0.0%)
From: mlemos at acm dot org Assigned:
Status: No Feedback Package: Informix related
PHP Version: 4.1.0 OS: Linux 2.2.x
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: mlemos at acm dot org
New email:
PHP Version: OS:

 

 [2001-12-22 22:48 UTC] mlemos at acm dot org
Ditto.

Patches

Add a Patch

Pull Requests

Add a Pull Request

History

AllCommentsChangesGit/SVN commitsRelated reports
 [2002-08-16 12:34 UTC] sniper@php.net
Not enough information was provided for us to be able
to handle this bug. Please re-read the instructions at
http://bugs.php.net/how-to-report.php

If you can provide more information, feel free to add it
to this bug and change the status back to "Open".

Thank you for your interest in PHP.



 [2002-08-17 15:38 UTC] mlemos at acm dot org
If you need more information please ask instead of closing this bug.

LVARCHAR is a Informix text field type of unspecified length similar ro MySQL TEXT field type.

To reproduce this bug follow these steps:

- Create a table with a LVARCHAR field.
- INSERT a row with some data in that field.
- SELECT that row.
- Use ifx_fetch_row to retrieve the field value.

When you access to the field value you will see warnings because the string value that is retrieved is not a NUL terminated string.
 [2002-09-17 15:48 UTC] pkedro1 at sears dot com
//create connection
    $connection=ifx_connect("audit@ifmx00296")
        or die("Couldn't create connection.");

    //create SQL statement
    $sql="select *
    from pjktest
    where col1 matches '$hname'";

//execute SQL query and get result
    $sql_result=ifx_query($sql,$connection)
        or die("Couldn't execute query");

    //format result in HTML table
    ifx_htmltbl_result($sql_result,"border=10");

Using Apache 1.3.22,PHP 4.2.2,Informx 9.21.UC2,ESQL 9.40,AIX 4.3.3.0.
col1 type lvarchar is only column in table, query fails when row is NOT
NULL

This Bug was closed as fixed in PHP 4.0.0 but I still have the problem.
 [2002-11-06 09:52 UTC] iliaa@php.net
Please try using this CVS snapshot:

  http://snaps.php.net/php4-latest.tar.gz
 
For Windows:
 
  http://snaps.php.net/win32/php4-win32-latest.zip


 [2002-11-21 17:05 UTC] sniper@php.net
No feedback was provided. The bug is being suspended because
we assume that you are no longer experiencing the problem.
If this is not the case and you are able to provide the
information that was requested earlier, please do so and
change the status of the bug back to "Open". Thank you.


 
PHP Copyright © 2001-2021 The PHP Group
All rights reserved.
Last updated: Fri Dec 03 11:03:36 2021 UTC