instead of ORCL, you can put the whole line in oci_connect
(DESCRIPTION = (ADDRESS = (PROTOCOL = TCP)(HOST = 192.168.3.14)(PORT = 1521)) (CONNECT_DATA = (SERVICE_NAME = ORCL) (SID = ORCL)))
PHP code:
oci_connect($username, $password, '(DESCRIPTION = (ADDRESS = (PROTOCOL = TCP)(HOST = 192.168.3.14)(PORT = 1521)) (CONNECT_DATA = (SERVICE_NAME = ORCL) (SID = ORCL)))');
check phpinfo () the output part of "Environment", if you do not have ORACLE_HOME, TNS_ADMIN, you need to make them available for your PHP working environment, for apache compiled with php_module
export ORACLE_HOME=/path/to/oracle_home export TNS_ADMIN=/path/to/tns_admin apachectl start
for php-cgi or php-fpm
export ORACLE_HOME=/path/to/oracle_home export TNS_ADMIN=/path/to/tns_admin /script/to/start/fpm
source share