ID: 36649 Updated by: [EMAIL PROTECTED] Reported By: madlybad at hotmail dot com -Status: Open +Status: Bogus Bug Type: OCI8 related Operating System: Windows XP Pro SP2 PHP Version: 5.1.2 New Comment:
The error you get comes from Oracle client libs -> not PHP problem. Previous Comments: ------------------------------------------------------------------------ [2006-03-08 07:23:48] cjbj at hotmail dot com The bug system is not the best place to ask this question. Refer to notes like http://www.oracle.com/technology/tech/php/htdocs/php_troubleshooting_faq.html and check all your environment variables - e.g. ORACLE_HOME - are set correctly in the shell environment that starts the web server. ------------------------------------------------------------------------ [2006-03-07 22:36:04] madlybad at hotmail dot com Description: ------------ My configuration to connect to Oracle 9i is correct. I am able to connect to Oracle 9i using SQLPLus and TOAD. But using PHP I am unable to connect to Oracle this error appears "ORA-12154: TNS:could not resolve the connect identifier specified". Reproduce code: --------------- <?php $conexion = oci_pconnect('TIENDAS','tiendas','DAVID');//('hr', 'hr', 'orcl'); if (!$conexion) { $e = oci_error(); echo "Error al Conectarse"; print htmlentities($e['message']); exit; } $consulta = 'SELECT * FROM promotoras_tda'; $id_sentencia = oci_parse($conexion, $consulta); if (!$id_sentencia) { $e = oci_error($conexion); echo "Error al Parsear"; print htmlentities($e['message']); exit; } $r = oci_execute($id_sentencia, OCI_DEFAULT); if (!$r) { $e = oci_error($id_sentencia); echo "Error al Ejecutar la Conuslta"; echo htmlentities($e['message']); exit; } print '<table border="1">'; while ($fila = oci_fetch_array($id_sentencia, OCI_RETURN_NULLS)) { print '<tr>'; foreach ($fila as $item) { print '<td>'.($item?htmlentities($item):' ').'</td>'; } print '</tr>'; } print '</table>'; oci_close($conexion); ?> Expected result: ---------------- connected! Actual result: -------------- ORA-12154: TNS:could not resolve the connect identifier specified ------------------------------------------------------------------------ -- Edit this bug report at http://bugs.php.net/?id=36649&edit=1
