Be part of JetBrains PHPverse 2026 on June 9 – a free online event bringing PHP devs worldwide together.

Ligonsker's avatar

After updating PHP version from 8.2.6 to 8.2.20, I get error about an invalid attribute on a PDO object

Hello,

I needed to update the PHP version from 8.2.6 to 8.2.20 for the security update.

I am using IIS 10. The only thing I did was to replace the php directory at C:/php with the new version of php.

I also copied the php.ini file so it would be the same, and I copied the SQL Server PDO extension - php_pdo_sqlsrv_82_nts_x64.dll that was inside C:/php/ext to the new php directory.

I then restarted the application pool and the website, cleared the Laravel app cache.

But now I get the following error:

SQLSTATE[IMSSP]: An invalid attribute was designated on the PDO object.

What could be the issue?

Thanks

0 likes
3 replies
Tray2's avatar

I habven't used IIS since windows NT4, but I suggest trying Herd for windows first, or check guides how to upgrade php on IIS.

1 like
Ligonsker's avatar

@Tray2 thank you. I came across this SO post, and this might be the answer - there was some update for PHP version 8.2.9 and the PDO sqlsrv extension 5.11 which is exactly the one I'm using:

https://stackoverflow.com/questions/76818310/laravel-10-stopped-working-with-sql-server-database/76912232#76912232

Looks like it might be it, and I just need to download the newest SQL Server pdo dll.

I will update as soon as I can do it

(I wish they would just give us a Linux server already 😅)

Ligonsker's avatar
Ligonsker
OP
Best Answer
Level 8

Update: There is a bug with older versions of SQL Server PDO extension for PHP with PHP versions over 8.2.9. It causes Laravel to not work. For more details: https://stackoverflow.com/questions/76818310/laravel-10-stopped-working-with-sql-server-database/76912232#76912232

I downloaded the latest PDO driver (in my case I'm using php_pdo_sqlsrv_82_nts_x64), and it worked again with PHP 8.2.20!

At first I wasn't sure it would do anything because both files weigh the same - 318KB. So the fix must've been really minor there

Please or to participate in this conversation.