+ Post New Thread
Results 1 to 13 of 13
Virtual Learning Platforms Thread, ubuntu8.04, Moodle, cmis, UnixODBC and FreeTDS in Technical; I've been trying to get the Moodle to Facility integration to work and i cant seem to get the UnixODBC ...
  1. #1
    gaz350's Avatar
    Join Date
    Jul 2007
    Location
    Rutland, east.leicestershire :P
    Posts
    579
    Thank Post
    47
    Thanked 49 Times in 41 Posts
    Rep Power
    28

    ubuntu8.04, Moodle, cmis, UnixODBC and FreeTDS

    I've been trying to get the Moodle to Facility integration to work and i cant seem to get the UnixODBC and FreeTDS section to work (connecting to mssql2000)

    anyone got any tips on this part of the process?


    freetds.conf

    Code:
    [pippin]
    Driver = FreeTDS
    Description = FacilityCMISDB
    Trace = Yes
    TraceFile = /tmp/msfacility.log
    Servername = pippin
    Database = CMIS_ADMIN
    Port = 1433
    ODBC.ini
    Code:
    [pippin]
            host = IP of server
            port = 1433
            tds version = 8.0
    odbcinst.ini
    Code:
    [FreeTDS]
    Description = FreeTDS Driver for Linux & MSSQL on Win32
    Driver = /usr/lib/odbc/libtdsodbc.so
    Setup = /usr/lib/odbc/libtdsS.so
    UsageCount = 1
    FileUsage = 1
    Trace = Yes
    TraceFile = /tmp/freetds.log
    
    #DEFAULT
    Driver = /usr/lib/odbc/libtdsodbc.so
    when testing the connection via iSQL all i get is
    [ISQL]ERROR: Could not SQLConnect


  2. #2


    Join Date
    Jan 2006
    Posts
    8,202
    Thank Post
    442
    Thanked 1,032 Times in 812 Posts
    Rep Power
    339
    this is for SIMS, so it should work for any MSSQL

    this is the freetds.conf I don't think the rest is relevant
    Code:
    [global]
    	host = 192.168.0.x
    	port = 1427
    	client charset = UTF-8
    	tds version = 7.0
    	text size = 20971520

    SQL2000/2005 use different port numbers

  3. #3


    Join Date
    Jan 2006
    Posts
    8,202
    Thank Post
    442
    Thanked 1,032 Times in 812 Posts
    Rep Power
    339
    we also have php-mssql for the php

    rpm -ql php-mssql
    /etc/php.d/mssql.ini
    /usr/lib64/php/modules/mssql.so

  4. #4
    gaz350's Avatar
    Join Date
    Jul 2007
    Location
    Rutland, east.leicestershire :P
    Posts
    579
    Thank Post
    47
    Thanked 49 Times in 41 Posts
    Rep Power
    28
    ok got things connecting.

    when i 1st started the install i had done a 14hr day! and this was at home and before i went to bed.

    just went through instructions again seems i hadn't installed tdsodbc, thought i had but oh well. connects now lets see how i get on with the rest of the installation now!

  5. #5
    gaz350's Avatar
    Join Date
    Jul 2007
    Location
    Rutland, east.leicestershire :P
    Posts
    579
    Thank Post
    47
    Thanked 49 Times in 41 Posts
    Rep Power
    28
    sorry to bump this oldish thread.

    now im back to work properly after some perternity leave/Xmas hols i would love to have another go at getting this working.

    anyone any ideas/tips on getting this working? thought it was connecting but getting

    [ISQL]ERROR: Could not SQLConnect
    ps in my orginal post the odbc ini and freetds are the wrong way round but the right way round in my config files
    Last edited by gaz350; 26th January 2009 at 09:31 PM.

  6. #6


    Join Date
    Jan 2006
    Posts
    8,202
    Thank Post
    442
    Thanked 1,032 Times in 812 Posts
    Rep Power
    339
    some more info on this thread

    SIMS Timetable Module for Moodle

  7. Thanks to CyberNerd from:

    gaz350 (29th January 2009)

  8. #7
    gaz350's Avatar
    Join Date
    Jul 2007
    Location
    Rutland, east.leicestershire :P
    Posts
    579
    Thank Post
    47
    Thanked 49 Times in 41 Posts
    Rep Power
    28
    ok here goes....

    1) TELNET returns

    Code:
    admin@Mivonks:~$ telnet 10.19.x.x 1433
    Trying 10.19.x.x...
    Connected to 10.19.x.x.
    Escape character is '^]'.
    2) tsql returns

    Code:
    admin@server:~$ tsql -S SERVERNAME -U user -P password
    locale is "en_GB.UTF-8"
    locale charset is "UTF-8"
    1>
    3) iSQL returns

    Code:
    admin@server:~$ isql servername user password
    +---------------------------------------+
    | Connected!                            |
    |                                       |
    | sql-statement                         |
    | help [tablename]                      |
    | quit                                  |
    |                                       |
    +---------------------------------------+
    SQL>
    4) go to the block on moodle. click transfer students. does some stuff and comes back witht he following.

    Code:
    Transfer Completed Successfully
    Transfer Log
    No transfer errors occurred
    Lookup Log
    Lookup Failures For year 7
    
    08studentname (last network login: 2008-12-18)
    Query returned nothing:- SELECT NS.studentid ,NS.forename, NS.calledname, NS.surname, NS.leftschool, NS.dateleft, SU.classgroupid, SU.courseyear, SU.courseid FROM nstupersonal NS INNER JOIN students SU on NS.studentid=SU.studentid WHERE NS.setid='2008/2009' AND SU.setid='2008/2009' AND NS.studentId='3557'
    above is just a sample of 1 student but it does this for every student!

    so from the above error message i assume its getting the info from Active Directory. then requesting the data it needs from cmis but failing.

    entering this statement directly on the SQL server works fine returning all the correct data.
    Only thing i can think i have missed is i read something about the need to compile php with freetds. which i am pretty sure it is, but not sure if its configured properly?

    still stuck but have a bit better understanding of whats going on now atleast.

  9. #8

    Join Date
    Mar 2009
    Location
    wakefield
    Posts
    15
    Thank Post
    1
    Thanked 2 Times in 2 Posts
    Rep Power
    12

    Facility To Moodle

    I've only just noticed this post, so sorry for the delay.
    You could be having trouble with the queries because it seems your idnumbers aren't zero prefixed.
    If the are zero prefixed in Facility - e.g. 001234 then that's exactly how they have to be in the active directory description field.

    If you can't fix them in the active directory description field, I could modify the block to allow a padding string to be used- this would automatically insert the 0 prefixes before it does the lookups - the queries should then work.

  10. #9
    gaz350's Avatar
    Join Date
    Jul 2007
    Location
    Rutland, east.leicestershire :P
    Posts
    579
    Thank Post
    47
    Thanked 49 Times in 41 Posts
    Rep Power
    28
    thx for the reply! Since my last message it's been madness will look into it over the weekend for you I think your correct that our ids don't have 00 prefixed in active directory
    edit: our ID's are 1234 and definately not 001234 in both the Database and Active Directory
    Last edited by gaz350; 24th April 2009 at 09:29 PM.

  11. #10

    Join Date
    Apr 2009
    Location
    Stoke
    Posts
    81
    Thank Post
    24
    Thanked 1 Time in 1 Post
    Rep Power
    0
    Can any one tell me how to install Php-mssql on ubuntu 8.04lts.

    And aslo any configuration (php-mssql) need to be done for moodle to talk to mssql server to retrive timetable from sims server.

    Cheers :0)

  12. #11


    Join Date
    Jan 2006
    Posts
    8,202
    Thank Post
    442
    Thanked 1,032 Times in 812 Posts
    Rep Power
    339
    Code:
    sudo apt-get install php5-mysql

  13. #12

    Join Date
    Apr 2009
    Location
    Stoke
    Posts
    81
    Thank Post
    24
    Thanked 1 Time in 1 Post
    Rep Power
    0
    Hi i ve already installed for php5-mysql,

    Actually i wanted is to install php-mssql to work with FreeTDS0.82 to pull up timetable from sims.

    Thanks

  14. #13


    Join Date
    Jan 2006
    Posts
    8,202
    Thank Post
    442
    Thanked 1,032 Times in 812 Posts
    Rep Power
    339
    sorry I misread ms for my.
    It looks like it's not included in ubuntu, you have to build yourself.
    have a look here, or try redhat/centos.
    php5-mssql - Ubuntu Forums

SHARE:
+ Post New Thread

Similar Threads

  1. Moodle - Word template to create Moodle XML Quiz
    By lasercat in forum Virtual Learning Platforms
    Replies: 4
    Last Post: 25th October 2010, 12:19 PM
  2. Outputting moodle test into cmis
    By drowe in forum Virtual Learning Platforms
    Replies: 0
    Last Post: 20th May 2008, 12:43 AM
  3. Moodle + CMIS
    By gaz350 in forum MIS Systems
    Replies: 0
    Last Post: 22nd April 2008, 11:41 AM
  4. Linking Moodle and CMIS - how possible is it?
    By nutso in forum Virtual Learning Platforms
    Replies: 6
    Last Post: 17th July 2007, 09:24 AM
  5. CMIS
    By tosca925 in forum Educational Software
    Replies: 4
    Last Post: 18th September 2005, 07:58 PM

Thread Information

Users Browsing this Thread

There are currently 1 users browsing this thread. (0 members and 1 guests)

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •