Monday, February 17, 2014

Using Joomla 2.5+ on Apache server with MS SQL database

Download of MS SQL Server 2008R2 with SP1 :
http://www.microsoft.com/en-us/download/details.aspx?id=26729
Select version with Tools SQLEXPRWT_x64_ENU.exe or SQLEXPRWT_x86_ENU.exe (depends on used OS).
For using MSSQL Server with PHP is necessary to install specific PHP extension. Download it from link :
http://www.microsoft.com/en-us/download/details.aspx?id=20098. For latest versions of PHP5.3 use SQLSRV20.EXE package. After execution of this file you can find in selected temp directory unpacked bunch of different dll's. Based on used PHP version (and compilation) choose appropriate extension file - I selected php_sqlsrv_53_ts_vc9.dll. Put this file in PHP subdirectory ext and add to php.ini following extension definition as :
extension="C:\PHP53\ext\php_sqlsrv_53_ts_vc9.dll"
Restart Apache server and look on phpinfo() printout - it shall include 'sqlsrv' section with information 'sqlsrv support - enabled'.
Install MS SQL Server and then open SQL Server Configuration manager. Check if SQL server is running. In SQL Server Network Configuration set in section Protocols for SQLEXPRESS :

Then open MS SQL Server Management Studio and create in Security/Logins section new user for Joomla application access :

Disable here 'Enforce password policy'. Set server roles and membership as follows :


Then it is possible use following data for Joomla connection to the MS SQL server ('sqlsrv').

No comments: