I'm trying to connect to the oracle database of a new partner, 11g Release 11.2.0.4.0, and I'm receiving the following error:
Warning: oci_connect(): ORA-12545: Connect failed because target host or object does not exist
The partner affirms that the connection string provided is correct.
This is the current structure of mine oci_connect() and the said connection string being used:
$connection_string = '(DESCRIPTION = (ADDRESS_LIST = (LOAD_BALANCE = ON)(FAILOVER = ON)(ADDRESS = (PROTOCOL = TCP)(HOST = HOST)(PORT = 1521)))(CONNECT_DATA = (SERVICE_NAME = SERVICE_NAME)))'
$conn = oci_connect($username, $password, $connection_string, 'UTF8', OCI_DEFAULT);
But, when using the following structure:
$connection_string = 'user/password@host:port/service_name'
$conn = oci_connect($username, $password, $connection_string, 'UTF8', OCI_DEFAULT);
It returns:
Warning: oci_connect(): ORA-12154: TNS:could not resolve the connect identifier specified
To give a clear picture of what I did, below are the steps I took to create my App-Service and install the oci8 php driver:
After that I could confirm the existence of the oci8 extension on my phpinfo() page.
Those steps where made following this documentation: Azure App Service Linux - Adding PHP Extensions
I also have latter defined the ORACLE_HOME setting as being /home/site/oracle/instantclient_18_5, but it had no diferences.
I'm out of ideas, can someone please indicate me what could be causing this problem and how can I solve it.
EDIT:
After further conversations with the partner it becamed clear that there isn't no way for me to connect to their database considering the current configuration of the same. As noted int the comments by Christopher Jones, its a problem of networking, ORA-12545, ORA-12541, ORA-12514, & ORA-01017 ??� How to fix for SQL Developer, and, in this case, lack of proper feedback.
Our community is visited by hundreds of web development professionals every day. Ask your question and get a quick answer for free.
Find the answer in similar questions on our website.
Do you know the answer to this question? Write a quick response to it. With your help, we will make our community stronger.
PHP (from the English Hypertext Preprocessor - hypertext preprocessor) is a scripting programming language for developing web applications. Supported by most hosting providers, it is one of the most popular tools for creating dynamic websites.
The PHP scripting language has gained wide popularity due to its processing speed, simplicity, cross-platform, functionality and distribution of source codes under its own license.
https://www.php.net/
Welcome to the Q&A site for web developers. Here you can ask a question about the problem you are facing and get answers from other experts. We have created a user-friendly interface so that you can quickly and free of charge ask a question about a web programming problem. We also invite other experts to join our community and help other members who ask questions. In addition, you can use our search for questions with a solution.
Ask about the real problem you are facing. Describe in detail what you are doing and what you want to achieve.
Our goal is to create a strong community in which everyone will support each other. If you find a question and know the answer to it, help others with your knowledge.