Joomla on MSSQL trouble installing

This forum is for issues with installing Joomla! 3.x on IIS webservers.

Moderator: General Support Moderators

Forum rules
Forum Rules
Absolute Beginner's Guide to Joomla! <-- please read before posting, this means YOU.
Forum Post Assistant - If you are serious about wanting help, you will use this tool to help you post.
Windows Defender SmartScreen Issues <-- please read this if using Windows 10
Locked
McVitas
Joomla! Apprentice
Joomla! Apprentice
Posts: 11
Joined: Thu Oct 19, 2017 8:24 am

Joomla on MSSQL trouble installing

Post by McVitas » Thu Oct 19, 2017 9:04 am

Hello, whoever has this running please share some tips with me how to configure it because I probably missed or don't understand something.
I have my little server with W2K12, IIS, PHP7 and MS SQL 2016 but Joomla install wizard can't connect to the server.
This example php test script works and connects to DB fine (via IUSR account under which the website is configured to run)

Code: Select all

$serverName = "localhost\sqlexpress"; //serverName\instanceName
// Since UID and PWD are not specified in the $connectionInfo array,
// The connection will be attempted using Windows Authentication.
$connectionInfo = array( "Database"=>"testdb");
$conn = sqlsrv_connect( $serverName, $connectionInfo);
if( $conn ) {
     echo "Connection established.<br />";
}else{
     echo "Connection could not be established.<br />";
     die( print_r( sqlsrv_errors(), true));
}
Joomla displays this when trying to connect.

Code: Select all

Could not connect to the database. Connector returned number: Database sqlsrv_connect failed, Array ( [0] => Array ( [0] => 08001 [SQLSTATE] => 08001 [1] => 2 [code] => 2 [2] => [Microsoft][ODBC Driver 13 for SQL Server]Named Pipes Provider: Could not open a connection to SQL Server [2]. [message] => [Microsoft][ODBC Driver 13 for SQL Server]Named Pipes Provider: Could not open a connection to SQL Server [2]. ) [1] => Array ( [0] => HYT00 [SQLSTATE] => HYT00 [1] => 0 [code] => 0 [2] => [Microsoft][ODBC Driver 13 for SQL Server]Login timeout expired [message] => [Microsoft][ODBC Driver 13 for SQL Server]Login timeout expired ) [2] => Array ( [0] => 08001 [SQLSTATE] => 08001 [1] => 2 [code] => 2 [2] => [Microsoft][ODBC Driver 13 for SQL Server]A network-related or instance-specific error has occurred while establishing a connection to SQL Server. Server is not found or not accessible. Check if instance name is correct and if SQL Server is configured to allow remote connections. For more information see SQL Server Books Online. [message] => [Microsoft][ODBC Driver 13 for SQL Server]A network-related or instance-specific error has occurred while establishing a connection to SQL Server. Server is not found or not accessible. Check if instance name is correct and if SQL Server is configured to allow remote connections. For more information see SQL Server Books Online. ) )

McVitas
Joomla! Apprentice
Joomla! Apprentice
Posts: 11
Joined: Thu Oct 19, 2017 8:24 am

Re: Joomla on MSSQL trouble installing

Post by McVitas » Sat Oct 21, 2017 10:17 pm

what, noone has Joomla on MSSQL? Really?...

User avatar
Per Yngve Berg
Joomla! Master
Joomla! Master
Posts: 30888
Joined: Mon Oct 27, 2008 9:27 pm
Location: Romerike, Norway

Re: Joomla on MSSQL trouble installing

Post by Per Yngve Berg » Sat Oct 21, 2017 10:34 pm

The support for MSSQL is going to be removed. No extension supports it anyway.

Vlad17
Joomla! Apprentice
Joomla! Apprentice
Posts: 20
Joined: Thu Mar 14, 2013 4:03 pm

Re: Joomla on MSSQL trouble installing

Post by Vlad17 » Wed Oct 25, 2017 5:09 pm

You may want to use MS SQL authentication instead of Windows authentication. I.e. for example (as a test only) sa account which you need to enable. Replace *** with your data to check.

Code: Select all

$serverName = "***\***"; //serverName\instanceName
$connectionInfo = array( "Database"=>"***", "UID"=>"sa", "PWD"=>"***");
$conn = sqlsrv_connect( $serverName, $connectionInfo);

if( $conn ) {
     echo "Connection established.<br />";
}else{
     echo "Connection could not be established.<br />";
     die( print_r( sqlsrv_errors(), true));
}
Enter you data during installation and it should work. However you will see an error with MS SQL syntax on the main page.

User avatar
leolam
Joomla! Master
Joomla! Master
Posts: 20652
Joined: Mon Aug 29, 2005 10:17 am
Location: Netherlands/ Germany/ S'pore/Bogor/ North America
Contact:

Re: Joomla on MSSQL trouble installing

Post by leolam » Wed Oct 25, 2017 5:15 pm

Please read carefully what Per wrote and realize that we have in the very near future no more support for MSSQL

As correctly mentioned by Per hardly any extensions supports MSSQL. Forget this with Joomla and use MySQL or change CMS to something that supports MSSQL ?

Leo 8)
Joomla's #1 Professional Services Provider:
#Joomla Professional Support: https://gws-desk.com -
#Joomla Specialized Hosting Solutions: https://gws-host.com -

McVitas
Joomla! Apprentice
Joomla! Apprentice
Posts: 11
Joined: Thu Oct 19, 2017 8:24 am

Re: Joomla on MSSQL trouble installing

Post by McVitas » Sat Nov 04, 2017 2:12 pm

Hello thanks for more replies. I figured it out (partially...). The first mistake was the server hostname. It must be not just localhost but localhost\sqlexpress. Then it connected but failed with login error. I fixed this by going to MS SQL studio and enabling SQL server and WIndows Authentication mode. Then the installation proceeded and created tables in DB (which I created in advance in SQL studio), however something failed during installation and the progress bar screen jumped back to "Overview". In Chrome console I can see index.php Failed to load resource: the server responded with a status of 500 (). Can't move forward from here.

And to address your warnings about support being removed and explain why I am trying this: it's simple. I have it working with MySQL server, BUT the website itself and the admin interface seems to be really slow to me and I really don't like that editing menus and clicking anything in there always takes several seconds to complete. Is this normal for CMS like Joomla or is something wrong with my system or PHP/MySQL settings I wonder? I work on a frikin localhost or over gigabit LAN if I open it from another pc, so why don't requests take just fraction of a second? That is why I wanted to test if MSSQL will be any better then MySQL from the performance point of view.

User avatar
AMurray
Joomla! Exemplar
Joomla! Exemplar
Posts: 9710
Joined: Sat Feb 13, 2010 7:35 am
Location: Australia

Re: Joomla on MSSQL trouble installing

Post by AMurray » Sat Nov 04, 2017 9:17 pm

Perhaps, to get a determination of your site-loading speed, use Google PageSpeed Insights to diagnose it. PageSpeed will then make suggestions for optimisation.

Database would only be one factor of a slow site if it is a contributor at all.
https://developers.google.com/speed/pag ... mpaign=PSI
Regards - A Murray
General Support Moderator

User avatar
AMurray
Joomla! Exemplar
Joomla! Exemplar
Posts: 9710
Joined: Sat Feb 13, 2010 7:35 am
Location: Australia

Re: Joomla on MSSQL trouble installing

Post by AMurray » Sat Nov 04, 2017 9:29 pm

MSSQL doesn't even get a mention on the stats page on www.joomla.org. https://developer.joomla.org/about/stats.html.

This might be because even if there are Joomla users using MS-SQL, it is voluntary by users to disclose this information - a plugin sends the anonymous data, but users can opt-out and not send the information.
Regards - A Murray
General Support Moderator


Locked

Return to “Joomla! 3.x on IIS webserver”