Problem with connection between sqlsrv_connect with php script

  • | 105 points

    my PC is 64bit, i want to make connection between microsoft sqlserver 2014 with php script, it always show fatal error in sqlsrv_connect even i have copied all extensions pdo_sqlsrv_56.dll with thread safe and not in my php/ext folder but it cannot solve it. Why?

  • administrators
    | 123676 points

    Please use 32 bit dll. I will update 64 bit soon

  • | 105 points

    so i must use all .dll of 32bit even if my PC is 64bit, isn't it? i have tried it but it still says fatal error or show nothing when i type localhost/phpmyadmin

  • administrators
    | 123676 points

    Yes, Laragon bundles 32-bit version of PHP for portability, so you must use 32-bit thread safe extensions. Please check error logs to figure out, google it. I hope you will sort it out. If not, I will help you when I'm back from vacation.

  • administrators
    | 123676 points

    @salma-nabila :
    After downloading Microsoft drivers 3.2 (, and extracting them, please take note of 2 files:

    • php_sqlsrv_56_ts.dll
    • php_pdo_sqlsrv_56_ts.dll

    Copy the two to ext dir, then go to Menu > PHP > Extensions and click to the dll names to enable them.

    That's all. No need to restart Apache or do something else.

    To test if it works:
    Use phpinfo() and search: sqlsrv
    You will see:

Log in to reply

Looks like your connection to Laragon was lost, please wait while we try to reconnect.