ahunter Posted October 10, 2008 Posted October 10, 2008 I was just wondering if anyone has managed to get moodle working using sql server 2005. I have php installed and the site is configured correctly through IIS using the extensions. Using a php test page I am able to connect to our sql server 2005 instance and database. The trouble comes when you get to the moodle install.php page. It asks you to specify the following: Type Host Server Database User Password Tables prefix The confusing bit is the host server. Nearly every website tells you to put localhost there. My question is how does it know which instance to use to find the database? My settings are: Type: SQL*Server with UTF-8 support (mssql_n) Host Server: localhost Database: moodle User: moodle Password: Tables prefix - mdl_ As far as I can tell my settings should be correct but I get this error message: We could not connect to the database you specified. Please check your database settings. If anyone has any experience of this I would be most grateful if you could assist me. Cheers.
Geoff Posted October 10, 2008 Posted October 10, 2008 I presume you've read and followed the documentation? Installing MSSQL for PHP - MoodleDocs It sounds like you've not enabled TCP/IP in MSSQL as per step #2
ahunter Posted October 10, 2008 Author Posted October 10, 2008 Hi, TCP/IP is enabled on the instance I'm using. It makes no difference. There is nothing blocking port 1433 so I don't understand what is going on. I noticed that there is boxes for TCP Dynamic Ports and TCP port these are blank but I did try putting 1433 in the TCP port and I got the same results.
Geoff Posted October 10, 2008 Posted October 10, 2008 Did you use the FreeTDS, ODBTP or the ODBC driver?
ahunter Posted October 10, 2008 Author Posted October 10, 2008 I used the free TDS but there is a problem with it. If I enabled dblib.dll and uncomment mssql.dll it moans at me saying mssql.dll has to be enabled in php.ini. So I did that seeing as though free TDS won't work for me. What does TDS actually do anyway???? lol.
Geoff Posted October 10, 2008 Posted October 10, 2008 It's a database driver. Have you tried using ODBC?
ahunter Posted October 10, 2008 Author Posted October 10, 2008 I haven't tried odbc but its not recommended. how do you have it setup?
rpwillis Posted October 10, 2008 Posted October 10, 2008 If you are using an instance of Sql Server rather than the default instance, then try servername\instancename for host server e.g. localhost\instance1. You could also try it with the machine name instead of localhost if that doesn't work. Richard SalamanderSoft Limited http://www.salamandersoft.co.uk Active Directory, SharePoint & Moodle provisioning
ahunter Posted October 13, 2008 Author Posted October 13, 2008 No joy with that I'm afraid it still refuses to see the database. If I create an instance using SQL server 2000 it sees the database no problem however SQL server 2000 is version 8.0 and the latest version of moodle requires the database/instance to be version 9.0 which is sql server 2005. Although at the moment it looks like it doesn't work well with sql server 2005.
rpwillis Posted October 13, 2008 Posted October 13, 2008 Can you connect to the database using anything else such as management studio? Is the service for the instance running? Richard
ahunter Posted October 13, 2008 Author Posted October 13, 2008 Hi, Yes I can connect using windows authentication or the dbowner account I setup. The service is running. I did setup a php page which connects to the database and that worked fine. It seems to be that moodle's install.php page will not see the database.
penfold_99 Posted October 13, 2008 Posted October 13, 2008 AFIK Sql Server 2005 runs on port 1427 We have 2000 running on 1433 and 2005 on 1427
ahunter Posted October 13, 2008 Author Posted October 13, 2008 Could you tell me what versions of moodle you guys are running and what sql server you are running it on? Thanks.
penfold_99 Posted October 13, 2008 Posted October 13, 2008 Could you tell me what versions of moodle you guys are running and what sql server you are running it on? Thanks. We are running 1.9 moodle but it's hosted on LAMP but we have integrated with SIMS.net Database which is running on SQL Server 2005 (ie pulls timetable course etc from sims.net)
ahunter Posted October 13, 2008 Author Posted October 13, 2008 I bit the bullet and installed mysql moodle now works a treat :-) thanks for all your help guys.
gshaw Posted October 31, 2008 Posted October 31, 2008 Yeah MSSQL Moodle "works" but it's not really the best platform for it as we've found out here... some stuff doesn't work as it should and can ge a bit fiddly
Recommended Posts
Create an account or sign in to comment
You need to be a member in order to leave a comment
Create an account
Sign up for a new account in our community. It's easy!
Register a new accountSign in
Already have an account? Sign in here.
Sign In Now