Hi everyone,
I'm trying to connect to a Oracle 11g database with a PHP script, unfortunatly I can't use the OCI8 methods to connect so I'm trying with odb_connect function.
The script is the follow:
$db = "Driver={ODBC};Server=(DESCRIPTION=(ADDRESS=(PROTOCOL=TCP)(HOST=xxx.xxx.xxx.xxx)(PORT=yyyy))(CONNECT_DATA=(SID=orcl)));Uid=username;Pwd=password;";
$username = 'username';
$password = 'password';
$connect = odbc_connect($db,$username,$password);
the output is False and I get this error "odbc_connect(): SQL error: [unixODBC][Driver Manager]Data source name not found, and no default driver specified, SQL state IM002 in SQLConnect..."
Probably the dsn string $db is wrong because I'm not sure about the right syntax.
Any help is useful. Thanks in advance.