php.net |  support |  documentation |  report a bug |  advanced search |  search howto |  statistics |  random bug |  login
Bug #14262 AccessViolation: oci-Problem
Submitted: 2001-11-28 01:44 UTC Modified: 2002-08-23 22:14 UTC
Votes:3
Avg. Score:5.0 ± 0.0
Reproduced:1 of 3 (33.3%)
Same Version:0 (0.0%)
Same OS:0 (0.0%)
From: mlr at interchain dot nl Assigned: kalowsky (profile)
Status: Wont fix Package: ODBC related
PHP Version: 4.0.6 OS: Windows2000
Private report: No CVE-ID: None
 [2001-11-28 01:44 UTC] mlr at interchain dot nl
I have the following situation, I execute the following select:

select 1 as '123456789 123456789 123456789 123456789'
from table;

when I display the field names the first 32 characters are ok, the rest of the string displayed are strange characters.

Kind regards
Marco Laponder
(mlr@interchain.nl)


Patches

Pull Requests

History

AllCommentsChangesGit/SVN commitsRelated reports
 [2001-11-28 02:24 UTC] derick@php.net
Which database are you trying to access through ODBC?

Derick
 [2001-11-28 02:31 UTC] mlr at interchain dot nl
You probably don't know the database, as the DBMS is developed in our company (is called UNIMS) and we have written our own ODBC driver. 

I have checked what our database returns and that is ok (no strange characters). 

I also looked in the php sources, and I think the problem is in the following struct (php_odbc.h) :

typedef struct odbc_result_value {
        char name[32];
        char *value;
        long int vallen;
        SDWORD coltype;
} odbc_result_value; 

But I am not a PHP-developer (yet ;-) )

Kind regards
Marco


 [2001-11-28 02:36 UTC] derick@php.net
Can you post a short script for me?

Derick
 [2001-11-28 02:39 UTC] mlr at interchain dot nl
Here it is:


<?
        $cnx = odbc_connect("unims","ecw","inter00");
        $query = "select 1 as '123456789 123456789 123456789 123456789 ' from bedryf;";
        $qid = odbc_exec($cnx,$query);
        echo odbc_field_name($qid,1);
        odbc_close($cnx);
?>

 [2001-11-28 02:42 UTC] derick@php.net
Okay, I'm on it.

Derick
 [2001-11-28 04:21 UTC] mlr at interchain dot nl
The strange characters displayed were  displayed due to an error in our own ODBC client. 

I still have the wish that the field name isn't limited to 32 but is allocated as needed, but I have no idea how difficult this is to implement.

Marco

 [2001-11-28 05:35 UTC] derick@php.net
Yes, I'll look into it (see also the e-mail I sent).

Derick
 [2001-12-01 12:10 UTC] derick@php.net
Re-assigning this to Dan

Derick
 [2001-12-07 11:56 UTC] kalowsky@php.net
When assigning a bug to a developer, use proper name :)
 [2002-06-24 17:48 UTC] kalowsky@php.net
Duplicate of 12962
 [2002-08-23 22:14 UTC] sniper@php.net
Same as for #12962..


 
PHP Copyright © 2001-2024 The PHP Group
All rights reserved.
Last updated: Tue Oct 08 08:01:27 2024 UTC