#37220 [Opn->Fbk]: LOB Type mismatch when using windows & oci8.dll

From: Date: Wed, 09 Aug 2006 13:17:49 +0000
Subject: #37220 [Opn->Fbk]: LOB Type mismatch when using windows & oci8.dll
References: 1  Groups: php.bugs 
Request: Send a blank email to php-bugs+get-100597@lists.php.net to get a copy of this message
 ID:               37220
 Updated by:       tony2001@php.net
 Reported By:      lbouteille dot ext at francetelecom dot com
-Status:           Open
+Status:           Feedback
 Bug Type:         OCI8 related
 Operating System: Win 2000
 PHP Version:      5.1.2
 Assigned To:      tony2001
 New Comment:

Okay, it works with Oracle 10g on Linux.


Previous Comments:
------------------------------------------------------------------------

[2006-08-09 12:55:56] lbouteille dot ext at francetelecom dot com

Check the detail of the error message : Sounds like XML wasn't valid..
it's working on my Linux server anyway.. maybe some oracle
configuration to deal with XML ?

Oracle Error :: LPX-00245 extra data after end of document
Cause
After the close of the top-level element, more data was found.
Action
The end-element tag for the top-level element must be the last thing in
the document.

------------------------------------------------------------------------

[2006-08-09 12:24:03] tony2001@php.net

I get only this:
Warning: ociexecute(): ORA-31011: XML parsing failed
ORA-19202: Error occurred in XML processing
LPX-00245: extra data after end of document

------------------------------------------------------------------------

[2006-08-07 11:30:03] lbouteille dot ext at francetelecom dot com

Here is the SQL command to create database :
CREATE TABLE myTable ( myColumn XMLTYPE NOT NULL)

and then tu put a row in the table:
INSERT INTO myTable VALUES(XMLTYPE('<THETAG myID="1234"></THETAG>'))

updateXML() and existsNode() are not procedures, they are part of the
Oracle query system (to query XMLTYPE values)

------------------------------------------------------------------------

[2006-08-07 09:54:36] tony2001@php.net

I don't have table myTable with column myColumn and procedures
updateXML() and existsNode().

------------------------------------------------------------------------

[2006-08-07 09:18:27] lbouteille dot ext at francetelecom dot com

I can't put the code online, but as it is really short, i'm writing it
here :

<?php
	//do the connection to the Oracle 9.2.0.7 database
	$conn = oci_pconnect($user,$password, $db);
	$xml = "<MYTAG/>";
	//now let's update the row where myId = 1234 and change the mother tag
'THETAG' to 'MYTAG' (MyColumn is a XMLTYPE datatype and myTable a std
Oracle table)
	$query = "UPDATE  myTable 
		SET     myTable.myColumn =
updateXML(myTable.myColumn,'/THETAG',xmltype.createXML(:data)) 
		WHERE   existsNode(myTable.myColumn,'/THETAG[@myID=\"1234\"]')=1"; 
	$stmt =  oci_parse ($conn, $query); 
	$clob = OCINewDescriptor($conn, OCI_D_LOB); 
	oci_bind_by_name($stmt, ':data', &$clob, -1,OCI_B_CLOB); 
	$clob->WriteTemporary($xml,OCI_TEMP_CLOB); 
	$success = OCIExecute($stmt,OCI_COMMIT_ON_SUCCESS); 
	OCIFreeStatement($stmt); 	
	$clob->free(); 
?>

------------------------------------------------------------------------

The remainder of the comments for this report are too long. To view
the rest of the comments, please view the bug report online at
    http://bugs.php.net/37220

-- 
Edit this bug report at http://bugs.php.net/?id=37220&edit=1


Thread (21 messages)

« previous php.bugs (#100597) next »