odbc icon indicating copy to clipboard operation
odbc copied to clipboard

"Unsupported driver [odbc]"

Open jeremiahsherrill opened this issue 5 years ago • 1 comments

PHP 7.2 Laravel 5.7 odbc is installed as a php extension

/vendor/laravel/framework/src/Illuminate/Database/Connectors/ConnectionFactory.php

 * @throws \InvalidArgumentException
     */
    protected function createConnection($driver, $connection, $database, $prefix = '', array $config = [])
    {
        if ($resolver = Connection::getResolver($driver)) {
            return $resolver($connection, $database, $prefix, $config);
        }
 
        switch ($driver) {
            case 'mysql':
                return new MySqlConnection($connection, $database, $prefix, $config);
            case 'pgsql':
                return new PostgresConnection($connection, $database, $prefix, $config);
            case 'sqlite':
                return new SQLiteConnection($connection, $database, $prefix, $config);
            case 'sqlsrv':
                return new SqlServerConnection($connection, $database, $prefix, $config);
        }
 
        throw new InvalidArgumentException("Unsupported driver [{$driver}]");
    }
}
 
Arguments
"Unsupported driver [odbc]"

jeremiahsherrill avatar Mar 06 '19 17:03 jeremiahsherrill

Check to make sure you have the pdo_odbc extension enabled, not just odbc.

danielsdeboer avatar Mar 06 '19 23:03 danielsdeboer