When I use PDO to connect to Oracle DBMS,I got this problem:
SQLSTATE[HY000]: OCIEnvNlsCreate: Check the character set is valid and that PHP has access to Oracle libraries and NLS data (ext\pdo_oci\oci_driver.c:619).
I have added ORACLE_HOME
,NLS_LANG
,PATH
to environment variables and php's config is right.
follows are my setting and configs:
NLS_LANG ORACLE_HOME PATH php-oci PDO php.ini
After setting environment variables I used set PATH=C:
in cmd and restarted cmd to take effect.
My platform is Windows Server 2008
and I'm using a web development environment PHPStudy
with php7.0.12
.And I got instantclient_12_2
from Oracle website Instant Client for Microsoft Windows (32-bit)(12.2.0.1.0)
oci_client_version()
in php but I just get0.0.0.0
– Howard Feng