Error message: ocilogon (): ORA-12154: TNS: couldnotresolvetheconnectidentifierspecifie! Operating system: Win7 local environment: xampp-win32-1.8.2-1-VC9, Oracle10g. PHP connection test code: [php] & lt ;? Phpopencil
Error message: ocilogon (): ORA-12154: TNS: cocould not resolve the connect identifier specifie!
Operating system: Win7
Local environment: xampp-win32-1.8.2-1-VC9, Oracle 10g.
PHP connection test code:
[Php]
Ocilogon ('emesc ', 'emesc', 'mesb ');
// Print_r (oci_error ());
?>
Ocilogon ('emesc ', 'emesc', 'mesb ');
// Print_r (oci_error ());
?> The result showed that: ocilogon (): ORA-12154: TNS: cocould not resolve the connect identifier specifie!
Cause Analysis: previously, PL/SQL was used by configuring tnsnames. ora and environment variables, resulting in an exception in environment variables when installing the oracle client. As a result, PHP cannot parse the connection string.
Solution: add the environment variable named TNS_ADMIN to the system: D: \ oracle \ product \ 10.2.0 \ db_1 \ network \ ADMIN. Connection test successful!