|
php.net | support | documentation | report a bug | advanced search | search howto | statistics | random bug | login |
PatchesPull RequestsHistoryAllCommentsChangesGit/SVN commits
[2004-06-08 08:52 UTC] tony2001@php.net
[2004-06-08 22:14 UTC] prichter at rci dot rutgers dot edu
[2004-06-09 08:13 UTC] tony2001@php.net
|
|||||||||||||||||||||||||||
Copyright © 2001-2025 The PHP GroupAll rights reserved. |
Last updated: Sat Dec 06 17:00:01 2025 UTC |
Description: ------------ When I try to run a query, in PHP using OCIExecute, for values of datatype VARCHAR2, I get the following error: "Warning: ociexecute(): OCIStmtExecute: ORA-03106: fatal two-task communication protocol error in /usr/local/apache2/htdocs/index.php on line 16". When I query for numbers it works fine as long as I use the TO_NUMBER conversion in the query. I'm currently running Red Hat Enterprise Linux 3.0 AS, Apache 2.0.49, PHP 4.3.6, and Oracle 9.2.0.4 Client. I'm trying to connect to an Oracle 8.1.7.0 server on a Windows 2000 box. Here are my settings and configurations: 1. I can connect the Oracle client to the server via SQL*Plus. Therefore, sqlnet.ora and tnsnames.ora are set correctly and the databases are compatible, at least for use with SQL*Plus. 2. I made sure that the Oracle Call Interface was installed with the Oracle 9i client. 3. PHP was configured with the following parameters: ./configure --with-mysql --with-oracle --with-oci8 --with-apxs2=<dir to apxs> 4. My environmental variables are set in /usr/local/apache2/bin/apachectl the following ways: LD_LIBRARY_PATH=/u01/app/oracle/lib:/usr/local/apache2/lib ORACLE_SID=oracledb ORACLE_BASE=/u01/app/oracle ORACLE_HOME=/u01/app/oracle TNS_ADMIN=/u01/app/oracle/network/admin TWO_TASK=/u01/app/oracle/network/admin NLS_LANG=AMERICAN_AMERICA.WE8ISO8859P1 (this matches the server setting) ORA_NLS33=/u01/app/oracle/ocommon/nls/admin/data LD_PRELOAD=/u01/app/oracle/lib/libclntsh.so.9.0 Reproduce code: --------------- <?php PutEnv("ORACLE_SID=oracledb"); PutEnv("ORACLE_HOME=/u01/app/oracle"); PutEnv("TNS_ADMIN=/u01/app/oracle/network/admin"); $user = "sys"; $pw = <the db pw>; $tns = "HHH"; if ($c=OCILogon($user, $pw, $tns)) { echo "Successfully connected to Oracle.\n"; $s = OCIParse($c, "SELECT FIRSTNAME AS FIRSTNAME FROM OHCS.STUDENT"); OCIExecute($s, OCI_DEFAULT); while (OCIFetch($s)) { echo "FIRSTNAME=" . ociresult($s, "FIRSTNAME") . "\n"; } OCILogoff($c); } else { $err = OCIError(); echo "Oracle Connect Error " . $err[text]; } ?> Expected result: ---------------- A simple list of all the first names in this table (OHCS.STUDENT). This is just a test. Actual result: -------------- Warning: ociexecute(): OCIStmtExecute: ORA-03106: fatal two-task communication protocol error in /usr/local/apache2/htdocs/index.php on line 16