Where to find "php_dblib.dll" which supports latest PHP version?

Where to find "php_dblib.dll" which supports latest PHP version?

by Sandun Amaratunga -
Number of replies: 4

Hi All,

I'm using Moodle 3.3.1+ hosted on IIS with PHP 5.6.31 and MS SQL server. I'm planning upgrade my site into 3.6.3+. For that I need to upgrade my PHP version to it's latest. Currently it's using "php_dblib.dll" to connect MS SQL server, but I have noticed that library is no longer support for latest PHP version.

Please advice me how to achieve this. Please kindly note that I can't change my platforms.

Thank You,

Sandun

Average of ratings: -
In reply to Sandun Amaratunga

Re: Where to find "php_dblib.dll" which supports latest PHP version?

by Colin Fraser -
Picture of Documentation writers Picture of Testers

I understand you can get the new drivers here 

https://github.com/Microsoft/msphpsql/releases

Don't get too excited though, the opening line reads: 

   We are excited to announce the hotfix release of the Microsoft Drivers for 
  PHP for SQL Server. The SQLSRV and PDO_SQLSRV drivers have been built with PHP 7.1, 7.2, and 7.3 
  and tested on all supported platforms.

I know that support for MSSQL drivers has ended but whether this continues into v7.x and later PHP releases, I don't know. The PHP site notes on MSSQL are not encouraging. Better read the documentation carefully.  

I would suggest this is an indicator that the Dark Side is going to jealously guard its proprietary property in future and will not allow third party programs access to its tools. You may be wise to consider opening negotiations with your host or network administrators or masters in whatever your situation is and alert them to the likelihood or possibility of a total disconnect between PHP and MSSQL. I understand that Moodle's support for MSSQL is strictly limited already, but if I am wrong, I would be happy to be corrected. I don't think that adding a MySQL or MariaDB10 or PostGreSQL would be called a "change of platform" just an additional DBMS. Good luck. 

Also, I anticipate that just as with AWS and GoogleCloud services, et al, the next version of Windows will have more in common with Chromebooks than as a stand alone system, Azure over alles I suspect.

Average of ratings: Useful (1)
In reply to Sandun Amaratunga

Re: Where to find "php_dblib.dll" which supports latest PHP version?

by Luis de Vasconcelos -
In your subject line you refer to the php_dblib.dll driver. That is the FreeTDS driver. Trying to use FreeTDS to install a Moodle 3.x site on a MS SQL Server database is like trying to use a horse and trailer to win a Formula 1 Grand Prix race - it's not going to work. Moodle dropped support for the FreeTDS php_dblib.dll driver a long time ago.

Using $CFG->dbtype = 'mssql' through FreeTDS is no longer supported in Moodle.

You need to change to the Microsoft Drivers for PHP for SQL Server drivers (yes, it's the most stupid name MS could ever have come up with!) and use $CFG->dbtype = 'sqlsrv'.

See:

You can get the Microsoft Drivers for PHP for SQL Server drivers from:
Average of ratings: Useful (1)
In reply to Sandun Amaratunga

Re: Where to find "php_dblib.dll" which supports latest PHP version?

by Oliver George -

No more guesses I tell you the exact location of  php_dblib.dll  Don't worry are you using MySQL server 3.6.3 if you have Cpanel then follow this process

Log into cPanel.Click PHP Configuration in the Software section. ...Select the version of PHP you want to use from the dropdown.Click Update to save your PHP configuration.Check your changes by viewing your settings in a phpinfo page.

this image is showing the updation process of MYSQL using php cpanel you can find both methods here so keep it up and further move forward for next step this is so simple like this 
In reply to Oliver George

Re: Where to find "php_dblib.dll" which supports latest PHP version?

by Luis de Vasconcelos -
Sandun clearly stated that he's using MS SQL server, not MySQL.