PHP and Oracle 9.xi - Please Somebody HELP ME!!

Collapse
This topic is closed.
X
X
 
  • Time
  • Show
Clear All
new posts
  • Gustavo Oliveira

    PHP and Oracle 9.xi - Please Somebody HELP ME!!

    Hi,

    I'm desperate...

    I've been installed Oracle Client. 9.1i in some computers and 9.2i in
    others. The installation was sucefull, because, I can use SQL Plus,
    without problems...

    Now I'm trying to connect, PHP with Oracle, and I'm experimented to
    diferents problems:

    1) When I start PHP, I get the error message: 'Unable to load dynamic
    library c:\php\extensio ns\php_oci8.dll '
    .. I'm quite sure that this file exist!!. More than this, I already use
    php_socket.dll, and this library is loaded ok.
    .. I've been already check PATH, and "c:\oracle\ora9 x\bin" is there.
    .. I tried to copy "php_oci8.d ll" and "oci8.dll" to "system32" folder but
    doesn't work.

    What I'm missing????

    2) In just one machine working with Oracle 9.2i client, I can load
    php_oci8.dll (i get this installing an uninstalling php, iis, and oracle
    client too many times, so I don't know why it's working...). But, (there is
    always a but...), when I try to connect, I get the following error:
    "Warning: ocilogon(): _oci_open_serve r: ès":
    .. Enviroment variables like "ORACLE_SID ", "ORACLE_HOM E" "TNS_ADMIN"
    "LD_LIBRARY_PAT H" are OK!
    .. "tsnames.or a" is ok to (I know that because I can use SQLPlus, and tnsping
    is fine)

    Again: Wha't I'm missing???

    I'm using PHP version 4.x (I already tried 4.0, 4.1, 4.2 and 4.3.4, and
    always get the same problem), IIS 4.5, and Windows XP Pro.

    Thanks a lot!!



  • Andy Hassall

    #2
    Re: PHP and Oracle 9.xi - Please Somebody HELP ME!!

    On Thu, 20 Nov 2003 12:27:44 -0300, "Gustavo Oliveira"
    <lgoliveira_nos pam_@matrix.inf .br> wrote:
    [color=blue]
    >I've been installed Oracle Client. 9.1i in some computers and 9.2i in
    >others. The installation was sucefull, because, I can use SQL Plus,
    >without problems...
    >
    >Now I'm trying to connect, PHP with Oracle, and I'm experimented to
    >diferents problems:
    >
    >1) When I start PHP, I get the error message: 'Unable to load dynamic
    >library c:\php\extensio ns\php_oci8.dll '
    >. I'm quite sure that this file exist!!. More than this, I already use
    >php_socket.dll , and this library is loaded ok.[/color]

    That error can mean a bit more than it says; e.g. one of the libraries that
    library depends on can't be loaded.
    [color=blue]
    >. I've been already check PATH, and "c:\oracle\ora9 x\bin" is there.[/color]

    OK... but is it there in the environment the web server sees? This can be
    different to your user's environment.
    [color=blue]
    >. I tried to copy "php_oci8.d ll" and "oci8.dll" to "system32" folder but
    >doesn't work.[/color]

    Don't do that. Remove them from system32 else you'll get into a worse mess.

    Besides, it's oci.dll on Windows, not oci8.dll.
    [color=blue]
    >What I'm missing????[/color]

    The usual things are:

    (a) Environment for the webserver different from that of your user, so it works
    for you, but not for your webserver.

    (b) Oracle 9i installs the Oracle home with tighter permissions than it did in
    8i, so make sure your webserver user has at least read and execute permissions
    on the Oracle home directories and files.

    As a test, you could alter the service for your webserver to log on as your
    user, rather than the system user it's probably set to. If this works, then
    it's one of the issues above.
    [color=blue]
    >2) In just one machine working with Oracle 9.2i client, I can load
    >php_oci8.dll (i get this installing an uninstalling php, iis, and oracle
    >client too many times, so I don't know why it's working...). But, (there is
    >always a but...), when I try to connect, I get the following error:
    >"Warning: ocilogon(): _oci_open_serve r: è[/color]
    s":

    Is that what appears? Corrupted characters like that? Looks bad.

    What sort of client install did you do? Did it install the OCI libraries? I
    can't remember off the top of my head what gets installed in a client install
    since I usually do a Custom install to pick and choose the bits I want.
    [color=blue]
    >. Enviroment variables like "ORACLE_SID ", "ORACLE_HOM E" "TNS_ADMIN"
    >"LD_LIBRARY_PA TH" are OK![/color]

    LD_LIBRARY_PATH doesn't apply to Windows; it just uses PATH for both libraries
    and executables.
    [color=blue]
    >. "tsnames.or a" is ok to (I know that because I can use SQLPlus, and tnsping
    >is fine)[/color]

    --
    Andy Hassall (andy@andyh.co. uk) icq(5747695) (http://www.andyh.co.uk)
    Space: disk usage analysis tool (http://www.andyhsoftware.co.uk/space)

    Comment

    Working...