大家好!
问题描述:
在windows下使用php连接oracle(apache2.2.13+php5.2.4+oracle9i)
1.使用<?php phpinfo();?>测试的时候显示了相关的php信息。2.把php.ini中的php_oci8.dll的注释去掉,并把php_oci8.dll复制到system32目录下面,
重启apache服务,使用phpconnect.php测试,报如下错误
Fatal error: Call to undefined function OCILogon() in D:\php\apache\htdocs\phpconnect.php on line 23.apache的错误日志:
[Wed Oct 14 19:23:31 2009] [notice] Parent: Received restart signal -- Restarting the server.
[Wed Oct 14 19:23:31 2009] [notice] Child 2244: Exit event signaled. Child process is ending.
[Wed Oct 14 19:23:31 2009] [notice] Apache/2.2.13 (Win32) PHP/5.2.4 configured -- resuming normal operations
[Wed Oct 14 19:23:31 2009] [notice] Server built: Aug  6 2009 15:50:50
[Wed Oct 14 19:23:31 2009] [notice] Parent: Created child process 2340
[Wed Oct 14 19:23:32 2009] [notice] Child 2340: Child process is running
[Wed Oct 14 19:23:32 2009] [notice] Child 2244: Released the start mutex
[Wed Oct 14 19:23:32 2009] [notice] Child 2340: Acquired the start mutex.
[Wed Oct 14 19:23:32 2009] [notice] Child 2340: Starting 64 worker threads.
[Wed Oct 14 19:23:32 2009] [notice] Child 2340: Starting thread to listen on port 80.
[Wed Oct 14 19:23:33 2009] [notice] Child 2244: All worker threads have exited.
[Wed Oct 14 19:23:33 2009] [notice] Child 2244: Child process is exiting
这里面好像没有什么错误啊希望各位大侠能够指点迷津,小弟不胜感激! help me!

解决方案 »

  1.   

    原来php5.2 的php_oci8.dll 必须要装oralce 10g 以上的client 才可以 , 因为OCILobRead2在oracle 10g的oci.dll 才有定义, oracle 支持建议安装oracle 10g client 也可以去网上找相关的dll文件,或者从别的机器里面copy以下方法从网上搜集过来的:1.创建一个子目录(例如,c:\instantclient10_1),然后把以下文件复制到c:\instantclient10_1目录下:
      oraociei10.dll
      orannzsbb10.dll
      oci.dll2.将 c:\instantclient10_1 添加到 PATH 中
    操作:“我的电脑”->“属性”->“高级”->“环境变量”,编辑系统变量列表中的 PATH。 
      

  2.   

    1楼说的我试过了,不行。
    我又在网上看到一个人说,windows下面不需要什么设置环境变量什么的,我就去掉了,还是不行。
    我不明白的就是为什么我的错误日志中不提示错误呢?我已经在php.ini中的oci8前面的注释去掉了啊,为什么还是没有引入呢?
      

  3.   

    要么就用旧点版本的oci试试看。
      

  4.   

    嗯. 注意 OCI.DLL 文件的版本 一定要符合...