Hi,

I send a select query statement to oracle database, but it returns:

Warning: OCIStmtExecute: ORA-03106: fatal two-task communication protocol error

on the OCIExecute line. The connection is OK and I can insert data with no problem.

Can anyone help?

Thanks
Bonnie

    Hi,

    that problem can be caused by a missing environment variable, NLS_LANG.

    Try to set NLS_LANG to your language, e.g. NLS_LANG=GERMAN_GERMANY.WE8ISO8859P1

    This sometimes also happens if the oracle client version doesn't match the oracle server version.

      Try to set NLS_LAN to English, not sure what is the correct value

        Hi,

        it might be

        NLS_LANG=AMERICAN_AUSTRALIA.UTF8
        NLS_LANG=AMERICAN_AMERICA.UTF8

        or

        NLS_LANG=ENGLISH_AMERICA.UTF8
        NLS_LANG=ENGLISH_AUSTRALIA.UTF8

        Use UTF8 or WE8ISO8859P1 depending on your database setup.

          I have changed the NLS_LANG variable, but it still can't fix the error. I am using php4.3.1, apache 1.3.27 on solaris8. Maybe it is the oracle version, I am interfacing php4 to oracle9. The connection test is fine and I can create table and insert data into the table, the problem happen only when I try to select data from the table.

            😕

            I did some further testing, this error doesn't happen when I only select numbers from a table! For example, if I change the column type to number and select rows, so long the selected columns are numbers, this error doesn't return. Like something to do with the data type. I tried "export NLS_LAN=ENGLISH_AUSTRALIA.WE8ISO8859P1" and some other values, still can't resolve this problem.

              Hi,

              most likely you character set doesn't match. Try to use UTF8 instead of WE8ISO8859P1. You might want to check which caracter set has been used creating the instance.

                I contacted the DBA who installed the oracle9. She told me the Language is American and the characterset is WE8ISO8859P1. I changed the NLS_LANG=AMERICAN.WE8ISO8859P1
                I received the following message:
                Warning: OCISessionBegin: ORA-12705: invalid or unknown NLS parameter value specified in /opt/app/apache_1.3.27-dso/htdocs/oratest/oratest.php on line 19
                Connection failedError Message: []

                  The characterset problem has been fixed by rebuild the php431. I use the exactly same configuration options. Maybe there is environment variable changes take effect.

                  Now I have another strang problem. The echo "\n"; not change line!

                    Hi,

                    did you mean in your html code ? Try <br> instead.

                      Write a Reply...