Jump to content
View in the app

A better way to browse. Learn more.

The Uniform Server Community

A full-screen app on your home screen with push notifications, badges and more.

To install this app on iOS and iPadOS
  1. Tap the Share icon in Safari
  2. Scroll the menu and tap Add to Home Screen.
  3. Tap Add in the top-right corner.
To install this app on Android
  1. Tap the 3-dot menu (⋮) in the top-right corner of the browser.
  2. Tap Add to Home screen or Install app.
  3. Confirm by tapping Install.

PHP 7.4.0 SQLSRV extensions not working

Featured Replies

Good Morning Uni Server Users,

I have UniServer Zero XIV running with PHP 7.4.0 I can connect fine to MySql databases, But I can not connect to MSSQL using sqlsrv_connect().

I have downloaded and added the following extensions to the extensions folder and the production.ini.

extension=php_sqlsrv_74_nts_x64.dll
extension=php_pdo_sqlsrv_74_nts_x64.dll
extension=php_sqlsrv_74_nts_x86.dll
extension=php_pdo_sqlsrv_74_nts_x86.dll

I can see them when I go into the select active module list on the uni controller

PHP >>  Edit Basic Modules >> PHP Modules Enable/Disable

However when I check the PHPinfo() they are not listed under extensions.

I checked the logs to see what error is and im getting an unable to load error.

Quote

PHP Startup: Unable to load dynamic library 'php_sqlsrv_7_nts_x86.dll' (tried: C:/UniServerZ/core/php74/extensions\\php_sqlsrv_7_nts_x86.dll (The specified module could not be found.)

The files location for these files are: C:\UniServerZ\core\php74\extensions

I notice there is a double slash in the location that apache is looking for this extension, if this causing the issue and stopping the extension from loading.  How do I change this if this is what is causing the issue?

If you need any more information please let me know.  I must be doing something wrong with the extensions but I'm just not sure what.

Kind regards, and many thanks

Ben

  • Author

FIXED ! 

I was using the wrong extensions

extension=php_sqlsrv_74_nts_x64.dll
extension=php_pdo_sqlsrv_74_nts_x64.dll
extension=php_sqlsrv_74_nts_x86.dll
extension=php_pdo_sqlsrv_74_nts_x86.dll

needed to be:

extension=php_sqlsrv_74_ts_x64.dll
extension=php_pdo_sqlsrv_74_ts_x64.dll
extension=php_sqlsrv_74_ts_x86.dll
extension=php_pdo_sqlsrv_74_ts_x86.dll

thank you to anyone who viewed this post.

  • 4 years later...
On 9/2/2020 at 3:09 PM, BenNedge said:

Good Morning Uni Server Users,

I have UniServer Zero XIV running with PHP 7.4.0 I can connect fine to MySql databases, But I can not connect to MSSQL using sqlsrv_connect().

I have downloaded and added the following extensions to the extensions folder and the production.ini.

extension=php_sqlsrv_74_nts_x64.dll
extension=php_pdo_sqlsrv_74_nts_x64.dll
extension=php_sqlsrv_74_nts_x86.dll
extension=php_pdo_sqlsrv_74_nts_x86.dll

I can see them when I go into the select active module list on the uni controller

PHP >>  Edit Basic Modules >> PHP Modules Enable/Disable

However when I check the PHPinfo() they are not listed under extensions.

I checked the logs to see what error is and im getting an unable to load error.

The files location for these files are: C:\UniServerZ\core\php74\extensions

I notice there is a double slash in the location that apache is looking for this extension, if this causing the issue and stopping the extension from loading.  How do I change this if this is what is causing the issue?

If you need any more information please let me know.  I must be doing something wrong with the extensions but I'm just not sure what.

Kind regards, and many thanks poppy playtime chapter 3

Ben

The PHP 7.4.0 unable to load SQLSRV extension issue resolution has outlined the troubleshooting steps and final solution by using the correct extension file for successful MSSQL connection.

  • 9 months later...
On 9/2/2020 at 3:09 PM, BenNedge said:

Good Morning Uni Server Users,

I have UniServer Zero XIV running with PHP 7.4.0 I can connect fine to MySql databases, But I can not connect to MSSQL using sqlsrv_connect().

I have downloaded and added the following extensions to the extensions folder and the production.ini.

extension=php_sqlsrv_74_nts_x64.dll
extension=php_pdo_sqlsrv_74_nts_x64.dll
extension=php_sqlsrv_74_nts_x86.dll
extension=php_pdo_sqlsrv_74_nts_x86.dll

I can see them when I go into the select active module list on the uni controller

PHP >>  Edit Basic Modules >> PHP Modules Enable/Disable

However when I check the PHPinfo() they are not listed under extensions.

I checked the logs to see what error is and im getting an unable to load error.

The files location for these files are: C:\UniServerZ\core\php74\extensions

I notice there is a double slash in the location that apache is looking for this extension, if this causing the issue and stopping the extension from loading.  How do I change this if this is what is causing the issue?

If you need any more information please let me know.  I must be doing something wrong with the extensions but I'm just not sure what.

Kind regards, and many thanks

Ben @Dinosaur Game

The double backslash isn’t the issue. The problem is a mismatch between your PHP build and the drivers.
* Check if PHP is **x86 or x64** and **NTS or TS** (`phpinfo()` shows this).
* Use only the matching DLLs (e.g., for 32-bit NTS: `php_sqlsrv_74_nts_x86.dll` + `php_pdo_sqlsrv_74_nts_x86.dll`).
* Remove incorrect DLL entries from `php.ini`.
* Install the **Microsoft ODBC Driver for SQL Server** and the required **VC++ Redistributable**.
Then restart Apache and check `phpinfo()` for `sqlsrv`.

  • 3 months later...
On 9/2/2020 at 3:09 PM, BenNedge said:

Good Morning Uni Server Users,

I have UniServer Zero XIV running with PHP 7.4.0 I can connect fine to MySql databases, But I can not connect to MSSQL using sqlsrv_connect().

I have downloaded and added the following extensions to the extensions folder and the production.ini.

extension=php_sqlsrv_74_nts_x64.dll
extension=php_pdo_sqlsrv_74_nts_x64.dll
extension=php_sqlsrv_74_nts_x86.dll
extension=php_pdo_sqlsrv_74_nts_x86.dll

I can see them when I go into the select active module list on the uni controller

PHP >>  Edit Basic Modules >> PHP Modules Enable/Disable

However when I check the PHPinfo() they are not listed under extensions.

I checked the logs to see what error is and im getting an unable to load error.

The files location for these files are: C:\UniServerZ\core\php74\extensions

I notice there is a double slash in the location that apache is looking for this extension, if this causing the issue and stopping the extension from loading.  How do I change this if this is what is causing the issue?

If you need any more information please let me know.  I must be doing something wrong with the extensions but I'm just not sure what.

Kind regards, and many thanks

Ben snow rider 3d

Is there a way to verify that the extensions are installed correctly and compatible with the PHP version I am using?

  • 1 month later...
On 9/2/2020 at 3:09 PM, BenNedge said:

Good Morning Uni Server Users, fnaf

I have UniServer Zero XIV running with PHP 7.4.0 I can connect fine to MySql databases, But I can not connect to MSSQL using sqlsrv_connect().

I have downloaded and added the following extensions to the extensions folder and the production.ini.

extension=php_sqlsrv_74_nts_x64.dll
extension=php_pdo_sqlsrv_74_nts_x64.dll
extension=php_sqlsrv_74_nts_x86.dll
extension=php_pdo_sqlsrv_74_nts_x86.dll

I can see them when I go into the select active module list on the uni controller

PHP >>  Edit Basic Modules >> PHP Modules Enable/Disable

However when I check the PHPinfo() they are not listed under extensions.

I checked the logs to see what error is and im getting an unable to load error.

The files location for these files are: C:\UniServerZ\core\php74\extensions

I notice there is a double slash in the location that apache is looking for this extension, if this causing the issue and stopping the extension from loading.  How do I change this if this is what is causing the issue?

If you need any more information please let me know.  I must be doing something wrong with the extensions but I'm just not sure what.

Kind regards, and many thanks

Ben

Hey, there are two main issues:

Check the DLL file names in production.ini exactly match the files in the extensions folder (e.g., php_sqlsrv_74_nts_x64.dll, not php_sqlsrv_7_nts_x86.dll).

Most importantly, you need to install the Microsoft ODBC Driver for SQL Server on your system; without it, the extension won't load.

Join the conversation

You can post now and register later. If you have an account, sign in now to post with your account.

Guest
Reply to this topic...

Account

Navigation

Search

Configure browser push notifications

Chrome (Android)
  1. Tap the lock icon next to the address bar.
  2. Tap Permissions → Notifications.
  3. Adjust your preference.
Chrome (Desktop)
  1. Click the padlock icon in the address bar.
  2. Select Site settings.
  3. Find Notifications and adjust your preference.