客户端装好后要配置监听的Warning: Unable to connect to ORACLE (ORA-12154: TNS:无法处理服务名) in D:\phpsite\hospital\TMPfeyxz77l60.php on line 33好像是说你的监听没有配好.

解决方案 »

  1.   

    监听怎么设定?
    还有那个php_oic8.dll怎么不能装载?
      

  2.   

    你都用php_oic8.dll了,怎么还用ora()来连接啊?应该用oic()来连接吧。
      

  3.   

    那个php_oraclle.dll也是打开的,我当然也可以用了。
    我是这两个都想用。
    问题现在是一个也用不上来。
      

  4.   

    $conn=OCILogon("$user","$pass","$tns");
    $q1 = "SELECT b.mc,
           sum(a.edcw) edcw,
           f_jcfx_get_zyrs1(b.xmxh,20040901) zyrs,
           round(sum(a.sycw)/decode(sum(a.edcw),0,null,sum(a.edcw)),4) syl,
           round(sum(a.cyrs)/decode(sum(a.edcw),0,null,sum(a.edcw)),4) zzl,
           sum(a.ryrs) ryrs,
           sum(a.cyrs) cyrs,
           sum(a.zrrs) zrrs,
           sum(a.zcrs) zcrs
      FROM jcfx_zy_zhxx a, jcfx_v_xmgl b
     WHERE a.jcfx_id >= 20040901
       AND a.jcfx_id <= 20040901
       AND b.bs = 'BQKS'
       AND a.ksdm = b.gldm
     GROUP BY b.mc,  b.xmxh";
    $mycursor($conn,$q1);
    OCIDefineByName($mycursor,"RY_DM",$ry_dm);
    OCIDefineByName($mycursor,"RY_MC",$ry_mc);
    OCIExecute($show_zg);
    while(OCIFetch($mycursor)){
    echo "RESULT: ora_getcolumn ($mycursor, 0), ora_getcolumn ($mycursor, 1) <br/>";
    }
    OCILogoff($conn);
    楼主试试吧!
      

  5.   

    OCIDefineByName($mycursor,"RY_DM",$ry_dm);
    OCIDefineByName($mycursor,"RY_MC",$ry_mc);
    是我自己的字段,忘记修改了.呵呵!
    不好意思
      

  6.   

    不是代码问题。
    是连接都不行啊。
    PHP Warning: Unknown(): Unable to load dynamic library 'd:\php\extensions\php_oci8.dll' - 找不到指定的程序。 in Unknown on line 0 
    你看看这个