php.net |  support |  documentation |  report a bug |  advanced search |  search howto |  statistics |  random bug |  login
Bug #43688 Oracle field name truncated to 15 characters using ODBC/Instantclient
Submitted: 2007-12-27 14:36 UTC Modified: 2008-02-05 01:00 UTC
Votes:11
Avg. Score:4.9 ± 0.3
Reproduced:7 of 7 (100.0%)
Same Version:3 (42.9%)
Same OS:3 (42.9%)
From: nuzul dot hayat at gmail dot com Assigned:
Status: No Feedback Package: ODBC related
PHP Version: 5.2.5 OS: CentOS
Private report: No CVE-ID: None
View Developer Edit
Welcome! If you don't have a Git account, you can't do anything here.
If you reported this bug, you can edit this bug over here.
(description)
Block user comment
Status: Assign to:
Package:
Bug Type:
Summary:
From: nuzul dot hayat at gmail dot com
New email:
PHP Version: OS:

 

 [2007-12-27 14:36 UTC] nuzul dot hayat at gmail dot com
Description:
------------
Compiled PHP 5.2.5 with Apache 2.2.6 with UnixODBC support and other standard options.

ODBC connection was set up using Instantclient version 10.2.0.3 ODBC driver. When tested using isql, the output was OK but when execute using PHP, the fields name truncated to only 15 chars resulting "Undefined Index" notice. This may be a notice but has huge impact on the system.

for example:

SS_SUBJECT_STATUS truncated to SS_SUBJECT_STAT.

Surprisingly, it seems that I'm alone. The closest article i found was field name limited to 30 chars but that is for MSSQL. Setting the defaultlrl also not working as the problem is in the field name, not the content.

Expected result:
----------------
isql output:

SQL> SELECT * FROM SUBJECT_SUMMARY s WHERE s.SS_SEMESTER_CODE='A042' AND s.SS_SUBJECT_CODE='LSI2023' AND s.SS_LECT_GROUP='A'
+-----------------+--------------+----------------+--------------+------------------+------------------+------------------+------------------+------------------+--------------------+--------------------+------------------+
| SS_SEMESTER_CODE| SS_STUDENT_ID| SS_SUBJECT_CODE| SS_LECT_GROUP| SS_TOTAL_CLASS   | SS_ATTEND_COUNT  | SS_LATE_COUNT    | SS_ABSENT_COUNT  | SS_UNKNOWN_COUNT | SS_WARNING_DATE    | SS_BAR_DATE        | SS_SUBJECT_STATUS|
+-----------------+--------------+----------------+--------------+------------------+------------------+------------------+------------------+------------------+--------------------+--------------------+------------------+
| 
+-----------------+--------------+----------------+--------------+------------------+------------------+------------------+------------------+------------------+--------------------+--------------------+------------------+


Actual result:
--------------
php output:

SS_SEMESTER_COD  	SS_STUDENT_ID  	SS_SUBJECT_CODE  	SS_LECT_GROUP  	SS_TOTAL_CLASS  	SS_ATTEND_COUNT  	SS_LATE_COUNT  	SS_ABSENT_COUNT  	SS_UNKNOWN_COUN  	SS_WARNING_DATE  	SS_BAR_DATE  	SS_SUBJECT_STAT

Patches

Pull Requests

History

AllCommentsChangesGit/SVN commitsRelated reports
 [2008-01-28 23:53 UTC] tony2001@php.net
Thank you for this bug report. To properly diagnose the problem, we
need a short but complete example script to be able to reproduce
this bug ourselves. 

A proper reproducing script starts with <?php and ends with ?>,
is max. 10-20 lines long and does not require any external 
resources such as databases, etc. If the script requires a 
database to demonstrate the issue, please make sure it creates 
all necessary tables, stored procedures etc.

Please avoid embedding huge scripts into the report.


 [2008-02-05 01:00 UTC] php-bugs at lists dot php dot net
No feedback was provided for this bug for over a week, so it is
being suspended automatically. If you are able to provide the
information that was originally requested, please do so and change
the status of the bug back to "Open".
 
PHP Copyright © 2001-2024 The PHP Group
All rights reserved.
Last updated: Sun Dec 22 06:01:30 2024 UTC