错误提示:ocilogon(): ORA-12154: TNS:could not resolve the connect identifier specifie!
操作系统:Win7
本地环境:xampp-win32-1.8.2-1-VC9 、 Oracle 10g。
PHP连接测试代码:
[php]
ocilogon('emesc','emesc','mesb');
//print_r(oci_error());
?>
ocilogon('emesc','emesc','mesb');
//print_r(oci_error());
?>结果发现提示:ocilogon(): ORA-12154: TNS:could not resolve the connect identifier specifie!
原因分析:之前通过自己配置tnsnames.ora和环境变量来使用PL/SQL,导致安装oracle客户端的时候环境变量异常。导致PHP无法解析连接字符串。
解决方案:在系统中添加:名为TNS_ADMIN的环境变量:D:\oracle\product\10.2.0\db_1\network\ADMIN。测试连接成功!

Hot AI Tools

Undresser.AI Undress
AI-powered app for creating realistic nude photos

AI Clothes Remover
Online AI tool for removing clothes from photos.

Undress AI Tool
Undress images for free

Clothoff.io
AI clothes remover

Video Face Swap
Swap faces in any video effortlessly with our completely free AI face swap tool!

Hot Article

Hot Tools

SublimeText3 Linux new version
SublimeText3 Linux latest version

VSCode Windows 64-bit Download
A free and powerful IDE editor launched by Microsoft

Dreamweaver CS6
Visual web development tools

Dreamweaver Mac version
Visual web development tools

WebStorm Mac version
Useful JavaScript development tools
