2

phpinfo

_ENV["ORACLE_HOME"] C:\oracle\instantclient_11_2\
_ENV["OS"]  Windows_NT
_ENV["Path"]    C:\WINDOWS\system32;C:\WINDOWS;C:\WINDOWS\System32\Wbem;C:\oracle\instantclient_11_2;\;

oci8

OCI8 Support    enabled
Version     1.2.5
Revision    $Revision: 1.269.2.16.2.43 $
Active Persistent Connections   0
Active Connections  0
Temporary Lob support   enabled
Collections support     enabled 

php code

<?php
     $conn = OCILogon('mppd1','mppd1', "121.256.476.86:1521/mydatabase");

$query = 'select * from users';

$stid = OCIParse($conn, $query);
//OCIExecute($stid, OCI_DEFAULT);
while ($succ = OCIFetchInto($stid, $row)) {
foreach ($row as $item) {
echo $item." ";
}
echo "<br>\n";
}

OCILogoff($conn);
?>

i am getting this error

Severity: Warning

Message: ocilogon() [function.ocilogon]: OCIEnvNlsCreate() failed. There is something wrong with your system - please check that PATH includes the directory with Oracle Instant Client libraries

5 Answers 5

6

I solved it copying all the content of C:\instantclient_11_2 (please check what´s yours) inside system and system32 folders in Windows , then I delete the path of C:\instantclient_11_2 in the PATH enviroment variable.

I am using XAMPP and Windows 8 and it´s the first time I see this issue. I always configured properly oci 8 with xampp and windows in a few minutes. I hope this would help you.

Sign up to request clarification or add additional context in comments.

3 Comments

I solved with above solution on windows 7 with wampserver.
This saved me 4 days of suffering!
You save my day........ thank you so much. after copying C:\instantclient_19_22 into system folder solved my error.
1

You need to copy all content of the instant client to apache/bin

im using xampp and working for me.

copy all files of the instant client enter image description here to apache/bin

1 Comment

Also everyone, check that you have the right version of the library and that both client and odbc match version and architecture.
1

I was facing the same error on uwamp 3 in connecting to oracle 11gR2.

I deleted the oracle instantclient from path variable and copied all files from instantclient to uwamp\bin\apache\bin

and it worked.

My setup:

  • System: Windows 7
  • Instantclient: instantclient-basiclite-win32-11.1.0.7.0
  • Web Server: Uwamp3

Comments

0

https://forums.oracle.com/forums/message.jspa?messageID=1742926#1745145

There are several potential solutions on that page ranging from re-installing xampp to checking permissions to using native php oci_connect(). Have you tried any of these things?

Comments

0

Probably you should download InstantClient and replace contents of /instantclient folder of Oracle client with the .dll-s of InstantClient.

Comments

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

Start asking to get answers

Find the answer to your question by asking.

Ask question

Explore related questions

See similar questions with these tags.