Hello, there is a need to connect to the Oracle database on a remote, from PHP, to read the data. Before that, I never worked with Oracle, therefore, digging in examples from the Internet, I try to connect as it is, but it does not work. PHP code that I execute:
$conn = oci_connect('username', 'password', '(DESCRIPTION=(ADDRESS_LIST=(ADDRESS=(PROTOCOL=TCP)(HOST=0.0.0.0)(PORT=1521))) (SDU=5844) (CONNECT_DATA=(SERVICE_NAME = XE)))'); if (!$conn) { $e = oci_error();exit($e['message']); } else echo 'ok'; Where: username is the user name, password is the password 0.0.0.0 is the IP address of the remote server (the real name, password and IP are naturally different).
As a result, I get this error
ORA-12541: TNS: no listener
On the server where PHP runs as the OS is Linux, the Oracle Instant Client is installed as the client. Who can tell what could be the problem, and where I made a mistake when connecting to the database, and how can I test the connection to a remote server?