Oracle + unixODBC + PDO_odbc

Hi,

When I try to connect to my oracle database through odbc drivers, I always get this exception:


Not Supported – yii\base\NotSupportedException

   Connection does not support reading schema information for 'odbc' DBMS.

The environment variables, unixODBC and clients are setting Ok, because I can connect with sqlplus to Oracle and isql to unixODBC.

My odbc.ini:


[GOS]

Description = "Gos odbc"

Servername = //192.168.1.110:1521/GOS

Port = 1521

Database = GOS

UserName =

Password =

Trace = Yes

TraceFile = /var/log/oraclegos.log

Application Attributes = T

Attributes = W

BatchAutocommitMode = IfAllSuccessful

BindAsFLOAT = F

CloseCursor = F

DisableDPM = F

DisableMTS = T

Driver = unixODBC

DSN = GOS

EXECSchemaOpt =

EXECSyntax = T

Failover = T

FailoverDelay = 10

FailoverRetryCount = 10

FetchBufferSize = 64000

ForceWCHAR = F

Lobs = T

Longs = T

MaxLargeData = 0

MetadataIdDefault = F

QueryTimeout = T

ResultSets = T

SQLGetData extensions = F

Translation DLL =

Translation Option = 0

DisableRULEHint = T

UserID = 

StatementCache=F

CacheBufferSize=20

UseOCIDescribeAny=F

SQLTranslateErrors=F

MaxTokenSize=8192

AggregateSQLType=FLOAT

My odbcinst.ini:


[unixODBC]

Description     = Oracle ODBC driver for Oracle 12c

Driver          = /usr/lib/oracle/12.1/client64/lib/libsqora.so.12.1

Setup           =

FileUsage       = 1

CPTimeout       =

CPReuse         = 

Trace           = Yes

TraceFile = /tmp/odbc.log

DEBUG           = 1

config/web.php:


'dbgos'=>

[

            'class'=>'\yii\db\Connection',

            'driverName' =>'unixODBC',

            'dsn' => 'odbc:Driver={unixODBC};Server=192.168.1.110;Database=GOS' ,

	    'emulatePrepare' => true,

            'username' => '*****',

	     'password' => '******',

],



This is my system:

Ubuntu 14.04 x64

Oracle Instant client 12.1 (Devel, base, odbc & sqlplus)

unixODBC

PHP v5.6

PDO & PDO_odbc

Yii 2.0.6

What are I doing wrong? driverName or dsn? any idea? It’s a nightmare…

:(