Troubleshooting: LD_LIBRARY_PATH… Warning: ocilogon() http://function.ocilogon: OCIEnvNlsCreate() failed.

Posted by in Oracle on Unix Server
10 Comments

If you are connecting an Oracle Database using an Apache2 webserver that runs on an Ubuntu machine, you might randomly have this error.

Warning: ocilogon() http://function.ocilogon: OCIEnvNlsCreate() failed. There is something wrong with your system - please check that LD_LIBRARY_PATH includes the directory with Oracle Instant Client libraries.

It can be solved setting properly the environment variable LD_LIBRARY_PATH in the configuration file /etc/apache2/apache2.conf

Add below the ServerRoot path:
ServerRoot "/etc/apache2"

the following line:
SetEnv LD_LIBRARY_PATH="/opt/oracle/instantclient_10_2"

Don’t forget to let us know if the solution is working also for you ;)

# # # # #

10 thoughts

  1. did it work?

    since some days i get randomly the same error message on my debian server ;(

  2. well… it worked… at least for me… :P

  3. well…

    i had this problem about 1 years ago.
    I changed the server (because of other reasons) and also upgraded apache & php etc. and since then i didn’t have this problem any more.

    some days ago it started again … very strange here. i will see in some day if this is fixed now again.
    i’ll let you know.

  4. sure! let us know!
    Thank you

  5. Still error : :d

    Warning: oci_connect() [function.oci-connect]: OCIEnvNlsCreate() failed. There is something wrong with your system – please check that LD_LIBRARY_PATH includes the directory with Oracle Instant Client libraries in /home/wildan/jobstuff/OpenThinkLabs/webapps/sandbox/oracle.php on line 2

  6. chintan

    April 20, 2010

    I am getting this kind of error on my site.

    Warning: ocilogon() [function.ocilogon]: OCIEnvNlsCreate() failed. There is something wrong with your system – please check that ORACLE_HOME is set and points to the right directory in

    Can u suggest the possible solution for the same?

  7. Seems to be working:)Thanks

  8. i got above error same . unable to find the root cause .. please help me

  9. Below is the error.. i am getting

    OCIEnvNlsCreate() failed. There is something wrong with your system – please check that ORACLE_HOME and LD_LIBRARY_PATH are set and point to the right directories in /data/httpd/www/BTS/projects/CDMA-Google/CMBP/cmbp.php on line 29

    Pls help me ..

  10. admin

    May 4, 2014

    Hi, did you manage to solve this issue?
    I made this setup few years ago so I can’t do any test now, but can you confirm you have added the 2 lines at the beginning of your apache2.conf file as specified in the instructions below?

    And are you sure the values of the of your paths are correct?

Reply