php.net |  support |  documentation |  report a bug |  advanced search |  search howto |  statistics |  random bug |  login
Bug #74647 Specific Type generates fetch error
Submitted: 2017-05-24 14:11 UTC Modified: 2017-05-25 03:33 UTC
From: uli dot staerk at globalways dot net Assigned: sixd (profile)
Status: Closed Package: PDO OCI
PHP Version: 7.0.19 OS: Linux
Private report: No CVE-ID: None
Welcome back! If you're the original bug submitter, here's where you can edit the bug or add additional notes.
If you forgot your password, you can retrieve your password here.
Password:
Status:
Package:
Bug Type:
Summary:
From: uli dot staerk at globalways dot net
New email:
PHP Version: OS:

 

 [2017-05-24 14:11 UTC] uli dot staerk at globalways dot net
Description:
------------
I have a column described as:
all_tab_columns.data_type = SDO_GEOMETRY

If I try to select this Column, the following error is generated:

 Error: SQLSTATE[HY000]: General error: 932 OCIStmtFetch: ORA-00932: inconsistent datatypes: expected CHAR got ADT (/usr/local/src/php7.0-7.0.19/ext/pdo_oci/oci_statement.c:497) 

Test script:
---------------
 CREATE TABLE "TEST"."ULITEST" 
   (
	"GEO_ID" NUMBER(38,0), 
	"GEOMETRIE" "MDSYS"."SDO_GEOMETRY" 
);

Insert into TEST.ULITEST (GEO_ID,GEOMETRIE) values (3,MDSYS.SDO_GEOMETRY(2001,31467,MDSYS.SDO_POINT_TYPE(3457079.42,5270387.7,null),null,null));

php > $r = $pdo->query("SELECT * FROM TEST.ULITEST");
php > foreach($r as $row) print_r($row);
PHP Warning:  Uncaught PDOException: SQLSTATE[HY000]: General error: 932 OCIStmtFetch: ORA-00932: inconsistent datatypes: expected CHAR got ADT
 (/usr/local/src/php7.0-7.0.19/ext/pdo_oci/oci_statement.c:497) in php shell code:1
Stack trace:
#0 {main}
  thrown in php shell code on line 1


Expected result:
----------------
The result should be the same as inserted by the statement.

Actual result:
--------------
PDOException

Patches

Pull Requests

History

AllCommentsChangesGit/SVN commitsRelated reports
 [2017-05-25 03:33 UTC] sixd@php.net
-Status: Open +Status: Closed -Assigned To: +Assigned To: sixd
 [2017-05-25 03:33 UTC] sixd@php.net
This is expected.  Use the kind of solutions given in the "Using Oracle Locator for Spatial Mapping" section of http://www.oracle.com/technetwork/topics/php/underground-php-oracle-manual-098250.html (Or use Python cx_Oracle 5.3+)

There are no short term plans to add support, so I'll close this bug.  But the feature request won't be forgotten.
 
PHP Copyright © 2001-2025 The PHP Group
All rights reserved.
Last updated: Tue May 13 13:01:27 2025 UTC