External Database Enrolment Plugin - "Error while communicating with external enrolment database"

External Database Enrolment Plugin - "Error while communicating with external enrolment database"

by Nathan Cobb -
Number of replies: 5

Hi

I'm trying to set up enternal database enrolment for the first time using the moodle plugin and am having some problems.  Whenever I run the script from the command prompt to test it/see what is happening I get the error "Error while communicating with external enrolment database".

I know the moodle server has access to the server with the external database on as I can get through if I set up an ODBC connection using the System DSN within the Windows server.

The table containing the data we are trying to access is a VIEW of data from our MIS.  This is in a SQL 10 database.

I've tried a couple of different database drivers within the moodle configuration page including "ODBC" and "ODBC_MSSQL" which seem like the obvious ones.

The PHP extension "php_pdo_odbc.dll" is installed and enabled correctly as best I can see.

Is there something else obvious which I'm missing?  Is there another setting I need to tweak somewhere?

Any thoughts from anyone successfully running this would be gratefully received as I'm stumped at this stage.

 

Setup details

Moodle 2.2.4+ (Build: 20120719) on Windows Server 2008 R2 Enterprise with Service Pack 1 (64-bit).

IIS Version is 7.5.7600.16385.

MySQL is version 5.5.13

PHP version is 5.3.6

 

Average of ratings: -
In reply to Nathan Cobb

Re: External Database Enrolment Plugin - "Error while communicating with external enrolment database"

by sas ss -

Hello, after 3 years have you reached a solution for such an error?

In reply to sas ss

Re: External Database Enrolment Plugin - "Error while communicating with external enrolment database"

by sas ss -

anyone?


connection2.png

In reply to sas ss

Re: External Database Enrolment Plugin - "Error while communicating with external enrolment database"

by Emma Richardson -
Picture of Documentation writers Picture of Particularly helpful Moodlers Picture of Plugin developers

You apparently are not connecting to the database...I would check your settings, firewalls, etc...

In reply to Emma Richardson

Re: External Database Enrolment Plugin - "Error while communicating with external enrolment database"

by sas ss -

hello, I am using WAMP on Windows7, PHP 5.5, Apache 2.4.9, Moodle on MySQL and trying to connect to MSSQL, If I go to the external database plugin it shows me the connection is well configured and names of the table in MSSQL; I will list everything I've done and please if anyone can help or transfer the thread to development since all over Moodle forum I find the same question and then no luck in connecting or it connects but the steps are not specified.


I am not the PC administrator
The PC is on a network
No local antivirus or firewall shown
The MSSQL and MySQL are on the same PC

Localhost:8080
php_sqlsrv_55_ts (extension installed, php.ini modified, right sign next to it in wamp-php-extensions)
php_pdo_sqlsrv_55_ts (extension installed, php.ini modified, right sign next to it in wamp-php-extensions)
sybase_ct active (though I read it might need other dll dependencies, please anyone knows them?)
ntwdblib.dll added to php and apache though useless (wamp-php-extensions php_mssql shows a red square)
phpdblib.dll added with freetds.conf file located in C:\ (I'm using wamp shall it be located elsewhere?) the file contains

[global]

host = 127.0.0.1 #shall I add an instance? how to do that please?

port = 1433

client charset = UTF-8

tds version = 7.2     # tdsversion shall it be 8.0 and whats the difference?

text size = 40971520

debug level = 1

 

odbc.ini  added to it a line at the end tds_version = 7.2 (if freetds.conf modified to 8.0 this must be modified as well?)

php.ini added the extension of dblib and it has a right check in wamp-php-extensions;

The extensions that show exclamation mark in php-extensions php-opcache, php_enchant are those necessary for our case? (there are some extensions that are not "on" but without exclamation mark so I guess those are ok)

Is there any Apache module that needs to be added?

My PHP info says without-mssql" "--without-pdo-mssql"

PDO support

enabled

PDO drivers

sqlsrv, mysql, odbc, sqlite

pdo_sqlsrv

pdo_sqlsrv support

enabled

 

Directive

Local Value

Master Value

pdo_sqlsrv.client_buffer_max_kb_size

10240

10240

pdo_sqlsrv.log_severity

0

0

sqlsrv

sqlsrv support

enabled

 

Directive

Local Value

Master Value

sqlsrv.ClientBufferMaxKBSize

10240

10240

sqlsrv.LogSeverity

0

0

sqlsrv.LogSubsystems

0

0

sqlsrv.WarningsReturnAsErrors

On

On

 

Do you think 10240 must be changed, do you think without-mssql" "--without-pdo-mssql" (is a normal message?)

dblib is not shown anwhere in php.info is that normal?

 

shall I add

•          mssql.textlimit = 20971520

•          mssql.textsize = 20971520 to php.ini although I am not using mssql? if not under what name shall I put those in php.ini

 

is there anything else that needs to be modified in php.ini such as mssql.secure_connection = On?

I tried even to install Moodle on MSSQL it reached the enter your admin credentials then gives an error though the database is created (i followed step by step the documentation on Moodle: IP, Port, collation, Ansi....)

I think its a timeout error, security error or ODBC error, any suggestions?

 

A Colleague told me about odbtp drive, I didn't know how to install it, anyone has any idea baout that?

 

 

Sorry for all the information above, but I thought maybe this issue lacks clarity, since its been asked a lot and there is not much step by step and debugging info mentioned


In reply to Emma Richardson

Re: External Database Enrolment Plugin - "Error while communicating with external enrolment database"

by sas ss -

Anyone? any idea please?