2、注册Apache服务。并测试成功(就是出现It worked!)
3、将PHP相关路径设置到环境变量中。我的是
D:\PHP\env-x64\php5.6;D:\PHP\env-x64\php5.6\ext;
4、手动安装10G数据库,手动安装12C客户端(PHP5.6连10G也需要12C的客户端)
5、将Oci相关Dll考到System32下
运行连接Oracle数据库的PHP角本,不出现成功和失败的输出提示。查询Apache的Error.log,发现如下警告:
PHP Warning: oci_connect(): OCIEnvNlsCreate() failed. There is something wrong with your system - please check that PATH includes the directory with Oracle Instant Client libraries in ....
最终解决方案:查看System32下的Oci.dll文件,761K,和12C下的一致。原来之前把12C下的oci.dll才进去了。重新将10G下的Oci.dll,注意是344K(考之前,需将Apache服务停止),重起Apache服务。
PHP数据库连接角本正常!