msphpsql: ATTR_ERRMODE exception is not supported
Hello,
Converting a running Laravel app on Windows to run under PHP 7 + Sql Server driver for Linux.
When PDO::ATTR_ERRMODE is set to PDO::ERRMODE_EXCEPTION I get this error:
SQLSTATE[IMSSP]: An unsupported attribute was designated on the PDO object.
This is supported in PDO_SQLSRV for Windows but not as it seems for linux…
I’m running CentOS 7, PHP 7.0.14, Apache 2.4.6
About this issue
- Original URL
- State: closed
- Created 7 years ago
- Comments: 16 (5 by maintainers)
for me
My project is using iis php8.2.9 lavarel 10 mssql. It is had this issue. I use xdebug for look at the process. I find \vendor\laravel\framework\src\Illuminate\Database\Connectors\SqlServerConnector.php line 19 PDO::ATTR_STRINGIFY_FETCHES => false. It will appear error and cross off it . it is fix.
My all day… QQ
Instead of editing the vendor file, i created a custom connector php 8.1 and Laravel 10
Thanks That Worked !!
Thanks, I commented this line and problem solved 😃