To all,
Hopefully I can explain this well enough to get an answer.
My setup:
php 3.0.18
redhat linux 6.1
apache 1.3.20
mod_perl 1.25
mod_ssl 2.8.4
openssl 0.9.6a
unique_id apache module
oracle 8i (on a sun based system)
The scenario:
I'm trying to store and retrieve information for an Oracle 8i database. I'm supporting both a french and english version of the web site using the same apache environment. The user can enter french characters that are stored in the database. Additionally, they can later retrieve these characters from the database. These storage and retrievals are performed using stored procedures. The Oracle 8i database resides on another machine (a sun machine). I'm using the OCI (sql*net) libraries to communicate across the machines. Additionally, I have a web server farm where the retrieval can be performed from a different machine than the storage. I also identify a user's session (and thus maintain state data) via setting a cookie with a value from the unique_id module. This session information is stored in and retrieved from the same oracle database.
The problem:
When I DO NOT have the following environment variables:
export NLS_LANG=American_America.UTF8
export ORA_NLS33=${ORACLE_HOME}/ocommon/nls/admin/data
I can't store the french characters ('é', 'à'...) in the database w/o them getting munged on the way in or out.
When I DO have the environment variables set as above, I can store and retrieve the french characters in the database just fine. However, as I stated above, the session id information is also stored in the database. I know that the session id is stored correctly. However, when the user has switched to a different machine and done the retrieval of the same session id via a stored procedure (verified identical values in the log output), it appears that the query didn't even execute. I have verified that the aforementioned environment variables are also identical on both machines. Additionally, the oracle installations between the 2 web servers is said to be identical from the DBA.
Can someone tell me what is going on here? Should I be using a different NLS setting? Does this value have to match the values as defined in the database server configuration? Hopefully I've provided enough info.
Thanks for all your help.