79826124

Date: 2025-11-21 04:14:20
Score: 2.5
Natty:
Report link

so I found that when I type
`\DB::connection()->getPdo()->getAttribute(\PDO::ATTR_DRIVER_NAME);`

on tinker, it return dblib, it should return sqlsrv. altough I set sqlsrv in .env and config/database.php. and I found that I need to install pdo_sqlsrv.so and sqlsrv.so, and set the extension in php.ini.

then i just restart the php service brew services restart [email protected] and clear cachec config laravel. I was think that when install via homebrew everything is installed. this is my first using mac, so yea. i'm stupid.

but i don't get it. why usuing dblib becomes error. if I search on internet, dblib is extension for sql server too, but it is from open source. meanwhile sqlsrv is from microsoft. but you know what? it solved

Reasons:
  • Blacklisted phrase (0.5): I need
  • Long answer (-0.5):
  • Has code block (-0.5):
  • Ends in question mark (2):
  • Self-answer (0.5):
  • Low reputation (0.5):
Posted by: Fajar Alam