Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Fatal error: ORA-12154: TNS:could not resolve the connect identifier specified in /var/www/html/public/index.php on line 7 #6

Open
flik opened this issue Nov 18, 2018 · 1 comment

Comments

@flik
Copy link

flik commented Nov 18, 2018

When I try to access oracle db from SQLDeveloper tool, It is working but
when I trying to connect with provided php script. It is throwing error below.

Fatal error: ORA-12154: TNS:could not resolve the connect identifier specified in /var/www/html/public/index.php on line 7

<?php
//phpinfo(); exit;

$conn = oci_connect('system', 'oracle', 'oracledb/XE');
if (!$conn) {
    $e = oci_error();
    trigger_error(htmlentities($e['message'], ENT_QUOTES), E_USER_ERROR);
} else echo 'succesful';

exit;
@adrianharabula
Copy link
Owner

Hello @flik ! Is this still an issue for you? Have you checked https://docs.oracle.com/en/database/oracle/oracle-database/21/lacli/environment-variables-instant-client.html ?

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants