Skip to Main Content

Oracle oci8 problem: OCIEnvNlsCreate() failed

IwawaFeb 10 2013 — edited Feb 12 2013
Hi to all,
I have installed Apache 2.4.3, PHP 5.3.21 and Oracle Database 10gR2 on a Windows 2003 server. Please that is installed the complete Oracle DB* and not the only Oracle Client.
When I run phpinfo This is the result:
OCI8 Support enabled
Version 1.4.9
Revision $Id: 44bfa713983a99b3e59477f6532e5fb51b6dee94 $
Active Persistent Connections 0
Active Connections 0
Oracle Run-time Client Library Version
Oracle Instant Client Version 10.2
Temporary Lob support enabled
Collections support enabled
Directive Local Value Master Value
oci8.connection_class no value no value
oci8.default_prefetch 100 100 Off Off
oci8.max_persistent -1 -1
oci8.old_oci_close_semantics Off Off
oci8.persistent_timeout -1 -1
oci8.ping_interval 60 60
oci8.privileged_connect Off Off
oci8.statement_cache_size 20 20
I have create a file connect.php in order to test my connection:

$dbHost = "win2003vm";
$dbServiceName = "myservice";
$usr = "myuser";
$pswd = "mypwd";

if(!$dbConn = oci_connect($usr,$pswd,$dbConnStr)){
$err = oci_error();
trigger_error('connection failed: ' . $err['message'], E_USER_ERROR);


$stmt = oci_parse($dbConn,$strSQL);
if ( ! oci_execute($stmt) ){
$err = oci_error($stmt);
trigger_error('Query failed: ' . $err['message'], E_USER_ERROR);

    $rslt = oci_result($stmt, 1); print "<h3>Query result: ".$rslt."</h3>";
But when I run the php file, this error is displayed:
Warning: oci_connect(): OCIEnvNlsCreate() failed. There is something wrong with your system - please check that PATH includes the directory with Oracle Instant Client libraries in C:\www\win2003vm\connect.php on line 13 Fatal error
Can someone help me ?
Thank You and best regards
Locked Post
New comments cannot be posted to this locked post.
Post Details
Locked due to inactivity on Mar 12 2013
Added on Feb 10 2013
1 comment