|
php.net | support | documentation | report a bug | advanced search | search howto | statistics | random bug | login |
PatchesPull RequestsHistoryAllCommentsChangesGit/SVN commits
[2002-08-06 05:24 UTC] thies@php.net
[2002-08-06 11:31 UTC] robert at ud dot com
|
|||||||||||||||||||||||||||
Copyright © 2001-2025 The PHP GroupAll rights reserved. |
Last updated: Tue Nov 04 18:00:01 2025 UTC |
PHP 4.2.1 compiled using --with-oci8 against Oracle 9i (9.2) libs on RH Linux 7.2 querying an Oracle 9i database. Running any query that contains any Oracle CHAR or VARCHAR2 datatype returns the following error: "Warning: OCIStmtExecute: ORA-03115: unsupported network datatype or representation" - Running the same queries in Oracle sqlplus client on Linux machine where PHP was built returns all data correctly. - Running queries that only contain numbers or dates work perfectly fine all the way from Oracle to PHP output. - Weirdly, casting the CHAR datatypes inside the query by wrapping them with TO_CLOB(foo) allows PHP to display data correctly. Are the OCI8 functions not completely compatible with the latest Oracle 9i (9.2) release and client libs? The PHP code I running to simply test Oracle connectivity and basic querying: ------------------------ putenv("ORACLE_HOME=/opt/oracle/product/9.2.0"); //fails: $strSQL = "SELECT ENAME, EMPNO FROM SCOTT.emp"; //works: //$strSQL = "SELECT EMPNO FROM SCOTT.emp"; //works: //$strSQL = "SELECT TO_CLOB(ENAME), EMPNO FROM SCOTT.emp"; $objDBCN = OCILogon("foo_uid","foo_pwd","foo_SID"); $objSTH = OCIParse($objDBCN, $strSQL); OCIExecute($objSTH); OCIFetchStatement($objSTH, $objRS); echo "<pre>"; print_r($objRS); echo "</pre>"; OCIFreeStatement($objSTH); OCILogOff($objDBCN); -------------------------