apache php and oracle

Collapse
This topic is closed.
X
X
 
  • Time
  • Show
Clear All
new posts
  • Ron Croonenberg

    #1

    apache php and oracle

    Hello all,

    I am trying to get php to work with oracle and apache.

    when I execute a script with ph that connects to an oracle database it
    seems to work.

    php without "oracle stuff" in apache seems to work.

    However when I try the script that connects to the database via the web
    I get messages like:
    OCISessionBegin : ORA-03106: fatal two-task communication protocol error in

    any ideas ? (does php not see the ORACLE_HOME and ORACLE_BIN
    environment variables ?)

    thanks,

    Ron
  • Erwin Moller

    #2
    Re: apache php and oracle

    Ron Croonenberg wrote:
    Hello all,
    >
    I am trying to get php to work with oracle and apache.
    >
    when I execute a script with ph that connects to an oracle database it
    seems to work.
    >
    php without "oracle stuff" in apache seems to work.
    >
    However when I try the script that connects to the database via the web
    I get messages like:
    OCISessionBegin : ORA-03106: fatal two-task communication protocol error in
    >
    any ideas ? (does php not see the ORACLE_HOME and ORACLE_BIN
    environment variables ?)
    >
    thanks,
    >
    Ron
    Hi Ron,

    I cannot help you with Oracle connecting, but if you want to test things
    concerning environmentvari ables, have a look at www.php.net and lookup
    putenv() function.

    Good luck.

    Regards,
    Erwin Moller

    Comment

    • Bart The Bear

      #3
      Re: apache php and oracle

      On Mon, 11 Sep 2006 20:00:17 -0400, Ron Croonenberg wrote:
      owever when I try the script that connects to the database via the web
      I get messages like:
      OCISessionBegin : ORA-03106: fatal two-task communication protocol error in
      >
      any ideas ? (does php not see the ORACLE_HOME and ORACLE_BIN
      environment variables ?)
      Try testing it with phpinfo(). It will show you oracle home and oracle sid.
      What is "ORACE_BIN" for? Here is what my environment looks like:

      $ php -r "phpinfo();"|gr ep -i oracle
      Oracle Version =>
      Compile-time ORACLE_HOME =>
      TNS_ADMIN =/oracle/product/10g/network/admin
      ORACLE_HOME =/oracle/product/10g
      PATH =/oracle/product/10g/bin:/usr/local/bin:/usr/bin:/usr/sbin:/bin:/sbin:/usr/X11R6/bin:/usr/local/java/bin:/usr/lib/qt-3.3/bin:/home/mgogala/bin:.
      LD_LIBRARY_PATH =/oracle/product/10g/lib
      ORA_NLS10 =/oracle/product/10g/nls/data
      _SERVER["TNS_ADMIN"] =/oracle/product/10g/network/admin
      _SERVER["ORACLE_HOM E"] =/oracle/product/10g
      _SERVER["PATH"] =/oracle/product/10g/bin:/usr/local/bin:/usr/bin:/usr/sbin:/bin:/sbin:/usr/X11R6/bin:/usr/local/java/bin:/usr/lib/qt-3.3/bin:/home/mgogala/bin:.
      _SERVER["LD_LIBRARY_PAT H"] =/oracle/product/10g/lib
      _SERVER["ORA_NLS10"] =/oracle/product/10g/nls/data

      Of course, to get the picture about the environment of the httpd process,
      you must execute phpinfo from within the httpd process. Also, if you're
      running Oracle 10.2, you need to fix protection on $ORACLE_HOME/network
      and $ORACLE_HOME/nls. Problem is that $ORACLE_HOME no longer has 755
      premission.

      Comment

      Working...