General help

 
 
Picture of jaschenka bankesen
Windows server: Could not install Moodle 1.9.19+ with MS SQL 2005
 

Hi,

I tried to install moodle  1.9.19+ on a Windows server 2003 R2 server with ISS and PHP 5.3.18 but I keep getting this error:

PHP has not been properly configured with the MSSQL extension so that it can communicate with SQL*Server. Please check your php.ini file or recompile PHP.

I have configured MS SQL and PHP and in the result of phpinfo i do get the section:

sqlsrv supportenabled
DirectiveLocal ValueMaster Value
sqlsrv.LogSeverity 0 0
sqlsrv.LogSubsystems 0 0
sqlsrv.WarningsReturnAsErrors On On

I have entered the following in the PHP.ini file:

extension_dir = d:\program files\php\ext
[PHP_SQLSRV]
extension=php_sqlsrv_53_nts_vc9.dll
extension=php_pdo_sqlsrv_53_ts.dll

;extension=php_dblib.dll

When I enable "extension=php_dblib.dll" bij removing the ;, every attempt to load a php page will end in FastCGI Error with an error number 258 (0x80070102).

If any one could give more some tips were to look, would be great.

Kind regards.


 
Average of ratings: -
Sketch...
Re: Windows server: Could not install Moodle 1.9.19+ with MS SQL 2005
Group Particularly helpful Moodlers

PHP has loaded the SQLSRV driver, no problem. What driver are you using in your Moodle config.php file? You should use:

$CFG->dbtype = 'sqlsrv';

http://docs.moodle.org/23/en/Using_the_Microsoft_SQL_Server_Driver_for_PHP

However, I don't think the Microsoft Drivers for PHP for SQL Server (SQLSRV) will work with Moodle 1.9. You might have to use FreeTDS instead.

http://docs.moodle.org/19/en/Installing_MSSQL_for_PHP#Using_FreeTDS_on_Windows

 

 
Average of ratings: -
Picture of jaschenka bankesen
Re: Windows server: Could not install Moodle 1.9.19+ with MS SQL 2005
 

Hi Luis,

Thank you for your anwser.

It seems indeed that Moodle 1.9 can't work with the MS drivers for PHP for SQL. But when I use the advised FreeTDS, I am not able to get the SQLSRV driver loaded again.  And when I tried to start Moodle I receive the following error message:

Missing file: E:\Data\Tools\moodle\lib\adodb/drivers/adodb-sqlsrv.inc.php

ADONewConnection: Unable to load database driver ''

The command extension=php_dblib.dll is present in the PHP.ini and I also placed the file "freetds.conf" in the root of the HDD's.

All other PHP drivers voor MS -SQL are disabled.

 

 
Average of ratings: -
Sketch...
Re: Windows server: Could not install Moodle 1.9.19+ with MS SQL 2005
Group Particularly helpful Moodlers

SQLSRV will not work with FreeTDS. SQLSRV is only for the Microsoft SQL Server PHP driver.

To use FreeTDS you should use the 'mssql_n' driver. What happens when you use: $CFG->dbtype = 'mssql_n'; in your Moodle config.php file?

You can also try 'mssql' - it seems that somewhere between Moodle 2.0 and 2.3 the docs changed from 'mssql_n' to 'mssql':

http://docs.moodle.org/23/en/Installing_MSSQL_for_PHP says use 'mssql
http://docs.moodle.org/20/en/Installing_MSSQL_for_PHP says use 'mssql_n'

although http://docs.moodle.org/23/en/FreeTDS still refrers to 'mssql_n'.

When I last used FreeTDS it was 'mssql_n'. Why? For the correct handling of Unicode UTF8 to UCS2. See MDL-6877.

Lastly, check the output of PHPInfo(). Does it contain a MSSQL section (with "Library version" = "FreeTDS") or a SQLSRV section? If not then PHP can't connect to SQL Server, which means that there's something wrong with your PHP/SQL Server configuration.

If after all that you still can't load FreeTDS you can enable the FreeTDS dump file option. See http://www.moodlewindows.za.net/5ConfigPHPforMSSQL.htm. Once that's done look at the dump file that is created and see if it reveals anything that might describe the problem.

PS Is there a reason why you want to install Moodle 1.9? That's an ancient version...

 
Average of ratings: -