ID: 28680 User updated by: prichter at rci dot rutgers dot edu Reported By: prichter at rci dot rutgers dot edu -Status: Feedback +Status: Open Bug Type: OCI8 related Operating System: Red Hat Enterprise Linux 3.0 AS PHP Version: 4.3.6 New Comment:
I installed the 8.1.7.0 client and eveything worked fine. Thank you for the reply. Previous Comments: ------------------------------------------------------------------------ [2004-06-08 08:52:50] [EMAIL PROTECTED] Try to connect to Oracle server using SQLPlus AND to execute the same query. Imo the problem is in your client, which is too new, comparing with version of server. Btw, putenv() doesn't help much, 'cos appropriate variables should be visible to OCI libs before they got initialized. ------------------------------------------------------------------------ [2004-06-07 20:30:07] prichter at rci dot rutgers dot edu 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 ------------------------------------------------------------------------ -- Edit this bug report at http://bugs.php.net/?id=28680&edit=1