pdo's error with oracle

时间:2018-05-06 17:14:38

标签: php oracle pdo

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 DTD XHTML 1.0 Transitional,EN,ORACLE_HOME 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 NLS_LANG in cmd and restarted cmd to take effect.

My platform is PATH and I'm using a web development environment set PATH=C: with Windows Server 2008.And I got PHPStudy from Oracle website Instant Client for Microsoft Windows (32-bit)(12.2.0.1.0)

1 个答案:

答案 0 :(得分:0)

我已通过将oraociei12.dll中的instantclient_12_2复制到E:\phpStudy\PHPTutorial\php\php-7.0.12-nts来解决此问题。多么神奇啊!