note 25444 modified in oci8.setup by sixd
| From: | sixd@php.net | Date: | Fri, 26 Jun 2009 18:20:50 +0000 |
| Subject: | note 25444 modified in oci8.setup by sixd | ||
| References: | 1 | Groups: | php.notes |
| Request: | Send a blank email to php-notes+get-157597@lists.php.net to get a copy of this message | ||
keywords: NLS_LANG, NLS_CHARACTERSET,SetEnv,putenv()
If you have tried setting the environment variables -- especially NLS_LANG -- in PHP with putenv(),
and perhaps also in Apache with SetEnv, and you are still having trouble with PHP+Oracle and foriegn
character sets (you get e.g. 'd' for '�'), try setting the environment
variables in your PROFILE (e.g. under bash) BEFORE starting the Apache server once more. This
finally stopped the problems we were having. For reference, set the following variables:
ORACLE_HOME
ORA_NLS33
TNS_ADMIN
TWO_TASK
CLASSPATH
LD_LIBRARY_PATH
NLS_LANG
An example would be:
NLS_LANG=GERMAN_GERMANY.WE8ISO8859P15; export NLS_LANG
Then restart Apache (see below for important note).
Our system was Sun SPARC 5.8, running Apache 1.3.26 with PHP 4.2.2, and the OCI8 API for Oracle.
One further note: restart Apache with:
apachectl stop
apachectl start
rather than
apachectl restart
otherwise your environment may not be reset.
Hope this helps someone!
Ed
--was--
keywords: NLS_LANG, NLS_CHARACTERSET,SetEnv,putenv()
If you have tried setting the environment variables -- especially NLS_LANG -- in PHP with putenv(),
and perhaps also in Apache with SetEnv, and you are still having trouble with PHP+Oracle and foriegn
character sets (you get e.g. 'd' for '�'), try setting the environment
variables in your PROFILE (e.g. under bash) BEFORE starting the Apache server once more. This
finally stopped the problems we were having. For reference, set the following variables:
ORACLE_HOME
ORA_NLS33
TNS_ADMIN
TWO_TASK
CLASSPATH
LD_LIBRARY_PATH
NLS_LANG
An example would be:
NLS_LANG=GERMAN_GERMANY.WE8ISO8859P15; export NLS_LANG
Then restart Apache (see below for important note).
Our system was Sun SPARC 5.8, running Apache 1.3.26 with PHP 4.2.2, and the OCI8 API for Oracle.
One further note: restart Apache with:
apachectl stop
apachectl start
rather than
apachectl restart
otherwise your environment may not be reset.
Hope this helps someone!
Ed
http://php.net/manual/en/oci8.setup.php