my configuration:
PHP
PHP 5.4.16
OCI8
OCI8 Support enabled OCI8 DTrace Support disabled OCI8 Version 2.0.11
Environment
LANG C
PATH /usr/local/sbin:/usr/local/bin:/usr/sbin:/usr/bin:/opt/instantclient
NOTIFY_SOCKET /run/systemd/notify
ORACLE_HOME /opt/instantclient
LD_LIBRARY_PATH /opt/instantclient
TNS_ADMIN /opt/instantclient/network/admin
XERCES_DISABLE_DTD 1
firewall
disable
issue
when i execute a php page with ocilogon:
ocilogon(): ORA-12170: TNS:Connect timeout occurred
but if i try telnet xxxx 1521 i can connect to the Db
my php code:
$test1 = "(DESCRIPTION =
(ADDRESS_LIST =
(ADDRESS = (PROTOCOL = TCP)(HOST = xxxxxx)(PORT = 1521))
)
(CONNECT_DATA = (SERVICE_NAME = yyy))
)";
$conn=ocilogon(USERNAME,PASSWORD,$test1) or die ("logon problem");
i tryed with oci_connect, same result.
Found the problem.
i tried to connect to a oracle rac with 5 different ip. My network admin allow only 4 of 5.
So network issue, with tcpdump we find the problem.
thanks
The technical post webpages of this site follow the CC BY-SA 4.0 protocol. If you need to reprint, please indicate the site URL or the original address.Any question please contact:yoyou2525@163.com.