how to connect to a remote oracle wirt php

Discussion in 'PHP' started by MarsHu, Jun 29, 2010.

  1. #1
    plz help me

    Warning: oci_connect(): OCIEnvNlsCreate() failed. There is something wrong with your system - please check that PATH includes the directory with Oracle Instant Client libraries.etc..

    I was trying to connect to oracle on a remote server with oci. I do intall the instant client and change the environment varible PATH, but it just doesn't work. It exhausted me.
    And by the way, i'm on windows and the oracle is on Solaris, and i'm a php beginner
     
    MarsHu, Jun 29, 2010 IP
  2. lukeg32

    lukeg32 Peon

    Messages:
    645
    Likes Received:
    19
    Best Answers:
    1
    Trophy Points:
    0
    #2
    I try not to use windows if possible, so i dont recall exactly if i've ever had any problems using it, but its not usually too complex to get oci8 working....

    Have you uncommended the oci8 class (dll) in php.ini?
    Does phpinfo() show that oci8 support is enabled?
    Do you have the ORACLE_HOME and NLS_LANG variables set in your envars file?
     
    lukeg32, Jun 29, 2010 IP
  3. MarsHu

    MarsHu Peon

    Messages:
    11
    Likes Received:
    0
    Best Answers:
    0
    Trophy Points:
    0
    #3
    yes, i uncommended the oci8 class in php.ini.
    I didn't find anything realated to oci8 support, there is no such keyword...
    And I was told ORACLE_HOME and NLS_LANG are not necessary to make oci8 work...I thought it was enough to put the instant client path at PATH varible.
     
    MarsHu, Jun 29, 2010 IP
  4. lukeg32

    lukeg32 Peon

    Messages:
    645
    Likes Received:
    19
    Best Answers:
    1
    Trophy Points:
    0
    #4
    lukeg32, Jun 30, 2010 IP
  5. MarsHu

    MarsHu Peon

    Messages:
    11
    Likes Received:
    0
    Best Answers:
    0
    Trophy Points:
    0
    #5
    Thank you so much, finally my oci works. It turns out that it's the same problem with my gd, i didn't set the extension_dir correctly in php.ini.
     
    MarsHu, Jun 30, 2010 IP