DeBoerTool / odbc-driver

ODBC Driver for Laravel 5.5+
MIT License
25 stars 11 forks source link

SQLSTATE[IM001]: Driver does not support this function: driver does not support quoting #16

Closed jcrodriguezt closed 2 years ago

jcrodriguezt commented 2 years ago

Hi! Hope you can help me to figure out this one.

While using the following combination of versions and packages, I get the following PDO Exception trying to connect using odbc: SQLSTATE[IM001]: Driver does not support this function: driver does not support quoting

Expected behavior: Normal connection and query execution

My environment:

  1. using XAMPP on Windows, PHP 8.0.12
  2. Using laravel's php artisan serve
  3. Sybase Ase Enterprise odbc driver
  4. Package: uepg/laravel-sybase 2.5
  5. Package: dbt/odbc-driver 1.0
  6. Package: barryvdh/laravel-debugbar 3.6.4

I've narrowed it down to a conflict with debugbar trying to use the quote function like for example in vendor\barryvdh\laravel-debugbar\src\DataCollector\QueryCollector.php:161 wich reads: $binding = $pdo->quote($binding);

But the thing is that if the odbc driver would support the function, debugbar wouldn't fail.

The only way my application works is by removing Debugbar. In some post I read something about DBAL not being version at least 3, and tried (with no luck) to update it from 2.x to 3.1 by removing the laravel-sybase package.

Application running under PHP 7 works Fine.

danielsdeboer commented 2 years ago

Debugbar is the issue here. I PR'd a change to debugbar, should have been released by now: https://github.com/barryvdh/laravel-debugbar/pull/1219