Forum LAMS for Tech-Heads - General Forum: LAMS Moodle Intergration Problems with 403 and 400 Errors


 
You may request notification for LAMS Moodle Intergration Problems with 403 and 400 Errors.
Search: 

1: LAMS Moodle Intergration Problems with 403 and 400 Errors
11/23/05 03:28 PM
[ Reply | Forward ]
After setting up a LAMS course in Moodle, when people initaly view the page it displays a

HTTP Status 400 - Invalid direct reference to form login page

type Status report

message Invalid direct reference to form login page

description The request sent by the client was syntactically incorrect (Invalid direct reference to form login page).
Apache Tomcat/4.1.24-LE-jdk14

Error in the iframe that has the LAMS content in it. Refreshing the page usualy clears the error sometimes it takes 2 or 3 refreshes.

Somtimes while in a session a 403 Error is diaplyed (I couldn't get one while posting this) in one or both of the frames of the session. It takes a individual frame refresh to clear these errors makeing these the hardest for end users to bypass. Most users dont know how to refersh a frame by it self. Any ideas why tomcat is throwing these errors out?

Regards,
Nathan Sain

Posted by Nathan Sain

2: Re: LAMS Moodle Intergration Problems with 403 and 400 Errors
In response to 1 11/23/05 07:12 PM
[ Reply | Forward ]
It seems the 1.0.2_20051019 has this issue (not just Moodle, but any integration). It's been fixed in 1.0.2_20051121 though, which you can get via the package for all other platforms on the LI/LF websites.

For those such as yourself, I'll attach an update package with only the necessary files (about 1.3MB) to update LAMS to this version. The installers and updaters for Windows/Mac should be updated in a week or two though.

Posted by Jun-Dir Liew

Attachments:
3: Re: LAMS Moodle Intergration Problems with 403 and 400 Errors
In response to 1 11/27/05 07:07 PM
[ Reply | Forward ]
I applied the patch that Jun-Dir offered in response to Nathan's email, and it did change the Moodle error I got, but it still doesn't work.

Here is the error I get at the 'Adding a new LAMS' dialog screen:
An unexpected error returned from LAMS server:Response not of type text/xml! Please contact your administrator.

Regards
ajt

Posted by Adam Taylor

4: Re: Re: LAMS Moodle Intergration Problems with 403 and 400 Errors
In response to 3 11/27/05 07:14 PM
[ Reply | Forward ]
Adam,

It seems that your error is due to a configuration error. can you post here the insert statement you entered in the LAMS database? (see http://lamsfoundation.org/integration/lamsintegration/)

Ernie

Posted by Ernie Ghiglione

5: Re: Re: Re: LAMS Moodle Intergration Problems with 403 and 400 Errors
In response to 4 11/28/05 10:53 PM
[ Reply | Forward ]
USE `lamsone`;



insert into `lamsone`.`ext_server_org_map` values (1,'neelix','neelix','neelix.cbhslewisham.nsw.edu.au','','','','',0,0);

Posted by Adam Taylor

7: Re: Re: Re: Re: LAMS Moodle Intergration Problems with 403 and 400 Errors
In response to 5 11/29/05 01:20 AM
[ Reply | Forward ]
Adam,

Yes, the stuff you inserted into the LAMS db is not going to fly.

Give me a day or so. We'll get a step-by-step integration instructions so we can you walkthru it

Ernie

Posted by Ernie Ghiglione

8: Re: Re: Re: Re: LAMS Moodle Intergration Problems with 403 and 400 Errors
In response to 5 11/29/05 06:01 PM
[ Reply | Forward ]
Hi Adam,

The SQL statement you posted won't work, the last digit '0' needs to be the id of the organisation in LAMS you intend to use for Moodle - there is no organisation with id=0. It's also missing a 'userinfo_url', which is what LAMS needs to respond to Moodle.

It should look something like this:

insert into ext_server_org_map (serverid, serverkey, servername, serverdesc, prefix, userinfo_url, timeout_url, disabled, orgid)
values ('neelix', 'neelix', 'neelix.cbhslewisham.nsw.edu.au', 'some description', 'choose a prefix, e.g. cb_', 'http://neelix.cbhslewisham.nsw.edu.au/moodle/mod/lams/userinfo.php?un=%username%&ts=%timestamp%&hs=%hash%', 'some timeout_url', 0, orgid);

The only items you need to get are the orgid and possibly the userinfo_url (your exact URL may be different, I just guessed it). And a prefix for your Moodle usernames. There's no need to manually enter an id for the row in ext_server_org_map, mysql will do that itself (it's also safer to let mysql do it, just in case you have another integrated server entry, and you overwrite it).

To get the orgid of the organisation you want to use:
1. login to LAMS and create an organisation, give it a name
2. login to mysql, and do 'select * from u_organisation'
3. find the row with the organisation name you just created - the column 'sid' is the id of the organisation you want to use.

Posted by Jun-Dir Liew

9: Re: Re: Re: Re: LAMS Moodle Intergration Problems with 403 and 400 Errors
In response to 5 11/29/05 11:56 PM
[ Reply | Forward ]
Adam,

We have just upgraded the LAMS integration configuration page to make it easier for people to understand what they need to do to get the LAMS integrations working. Please have a look here:

http://lamsfoundation.org/integration/lamsintegration/

Thanks,

Ernie

Posted by Ernie Ghiglione

6: Re: Re: Re: LAMS Moodle Intergration Problems with 403 and 400 Errors
In response to 4 11/28/05 10:54 PM
[ Reply | Forward ]
Hi Ernie



Now, since applying the patch, I am getting this error from the server:


HTTP Status 500 -

type Exception report

message

description The server encountered an internal error () that prevented it from fulfilling this request.

exception

org.apache.jasper.JasperException

at org.apache.jasper.servlet.JspServletWrapper.service(JspServletWrapper.java:254)

(etc etc etc)



Regards

ajt

Posted by Adam Taylor

Reply to first post on this page
Back to LAMS for Tech-Heads - General Forum