php-oci8 encoding issue php-oci8 encoding issue oracle oracle

php-oci8 encoding issue


Try connecting like this:

putenv("NLS_LANG=AMERICAN_AMERICA.WE8ISO8859P9");$db = "(DESCRIPTION=     (ADDRESS_LIST=       (ADDRESS=(PROTOCOL=TCP)         (HOST=$dbhost)(PORT=$dbport)       )     )       (CONNECT_DATA=(SID=$dbname)) )"; $conn = OCILogon($dbuser, $dbpasswd, $db);

Set the variables $db* according to your configuration.


I assume you are in a windows environment.

I had the same issue and I fixed it by
* creating a windows environment variable
NLS_LANG FRENCH_FRANCE.WE8ISO8859P1
* adding these line to my httpd.conf
SetEnv NLS_LANG FRENCH_FRANCE.WE8ISO8859P1

NB : Replace FRENCH_FRANCE.WE8ISO8859P1 by appropriate value