Uploaded image for project: 'Moodle'
  1. Moodle
  2. MDL-41497

Can't connect to ODBC database for database enrolments

    Details

    • Database:
      Any
    • Testing Instructions:
      Hide

      Enable the External DB auth plugin
      Go to the settings page for the plugin
      Verify that the Host field has help text next to the field including "Use a system DSN entry if using ODBC."
      Verify that the DB Name field has help text next to the field including "Leave empty if using an ODBC DSN."

      Enable the external db enrolment method for the site
      Go to the settings page for the external db enrolment method

      Verify that the dbhost field has help text next to the field including "Use a system DSN entry if using ODBC."
      Verify that the dbname field has help text next to the field including "Leave empty if using an ODBC DSN."

      Use a sanity check on the help text for these fields and complain if you think they don't make sense.

      Show
      Enable the External DB auth plugin Go to the settings page for the plugin Verify that the Host field has help text next to the field including "Use a system DSN entry if using ODBC." Verify that the DB Name field has help text next to the field including "Leave empty if using an ODBC DSN." Enable the external db enrolment method for the site Go to the settings page for the external db enrolment method Verify that the dbhost field has help text next to the field including "Use a system DSN entry if using ODBC." Verify that the dbname field has help text next to the field including "Leave empty if using an ODBC DSN." Use a sanity check on the help text for these fields and complain if you think they don't make sense.
    • Affected Branches:
      MOODLE_24_STABLE, MOODLE_25_STABLE
    • Fixed Branches:
      MOODLE_24_STABLE, MOODLE_25_STABLE
    • Pull Master Branch:
      MDL-41497-master

      Description

      Attempts to setup external database enrolment to an odbc database from a RedHat server fails to connect.

      $ sudo -u apache php sync.php -v
      Starting course synchronisation...
      PHP Warning: odbc_connect(): SQL error: [unixODBC][Driver Manager]Data source name not found, and no default driver specified, SQL state IM002 in SQLConnect in /var/www/moodlemaster/moodle/lib/adodb/drivers/adodb-odbc.inc.php on line 64

      Warning: odbc_connect(): SQL error: [unixODBC][Driver Manager]Data source name not found, and no default driver specified, SQL state IM002 in SQLConnect in /var/www/moodlemaster/moodle/lib/adodb/drivers/adodb-odbc.inc.php on line 64
      Error while communicating with external enrolment database
      Starting user enrolment synchronisation...
      PHP Warning: odbc_connect(): SQL error: [unixODBC][Driver Manager]Data source name not found, and no default driver specified, SQL state IM002 in SQLConnect in /var/www/moodlemaster/moodle/lib/adodb/drivers/adodb-odbc.inc.php on line 64

      Warning: odbc_connect(): SQL error: [unixODBC][Driver Manager]Data source name not found, and no default driver specified, SQL state IM002 in SQLConnect in /var/www/moodlemaster/moodle/lib/adodb/drivers/adodb-odbc.inc.php on line 64
      Error while communicating with external enrolment database

      In trying to setup an ODBC connection in Linux, lib/adodb/drivers/adodb-odbc.inc.php attempts to create a dsn less connection but fails to include a driver statement or the "server=".

        Gliffy Diagrams

          Attachments

            Issue Links

              Activity

                People

                • Votes:
                  1 Vote for this issue
                  Watchers:
                  4 Start watching this issue

                  Dates

                  • Created:
                    Updated:
                    Resolved:
                    Fix Release Date:
                    11/Nov/13