Forum Problems Installing LAMS: Moodle 1.8.3 and Lams 2.0.4


 
You may request notification for Moodle 1.8.3 and Lams 2.0.4.
Search: 

1: Moodle 1.8.3 and Lams 2.0.4
01/09/08 10:00 AM
[ Reply | Forward ]
When attempting to add a LAMSv2 activity in Moodle 1.8.3
I get the following errors

Notice: file_get_contents() function.file-get-contents: Unable to find the wrapper http - did you forget to enable it when you configured PHP? in /opt/coolstack/apache2/htdocs/MEL/mod/lamstwo/lib.php on line 231

Notice: file_get_contents() function.file-get-contents: Unable to find the wrapper http - did you forget to enable it when you configured PHP? in /opt/coolstack/apache2/htdocs/MEL/mod/lamstwo/lib.php on line 231

Warning: file_get_contents() function.file-get-contents: Unable to access http://myurl:8080/lams/services/xml/LearningDesignRepository?serverId=moodle&datetime=January+09%2C2008+9%3A44+am&hashValue=7076163a8858241ef1842874e6322aa0fd35520a&username=admin&courseId=2&mode=2&country=PH&lang=en_utf8 in /opt/coolstack/apache2/htdocs/MEL/mod/lamstwo/lib.php on line 231

Warning: file_get_contents(http://murl:8080/lams/services/xml/LearningDesignRepository?serverId=moodle&datetime=January+09%2C2008+9%3A44+am&hashValue=7076163a8858241ef1842874e6322aa0fd35520a&username=admin&courseId=2&mode=2&country=PH&lang=en_utf8) function.file-get-contents: failed to open stream: No such file or directory in /opt/coolstack/apache2/htdocs/MEL/mod/lamstwo/lib.php on line 231

Notice: Undefined variable: http_response_header in opt/coolstack/apache2/htdocs/MEL/mod/lamstwo/lib.php on line 234

Notice: Undefined offset: 2 in /opt/coolstack/apache2/htdocs/MEL/mod/lamstwo/lib.php on line 234

Notice: Undefined offset: 1 in /opt/coolstack/apache2/htdocs/MEL/mod/lamstwo/lib.php on line 234
The Moodle to LAMS REST call failed and returned an HTTP status of:

Stangely the message ends here, since its not acutally even trying to do an HTTP request.

I have TWO moodle installs on this apache2 server.
One is 1.8 and works fine with LAMS
One is 1.8.3 and gives this error.

The lamsv2 activity config is validated.

Posted by Dave Bauer

2: Re: Moodle 1.8.3 and Lams 2.0.4
In response to 1 01/09/08 06:33 PM
[ Reply | Forward ]
Hi Dave,

> One is 1.8 and works fine with LAMS
> One is 1.8.3 and gives this error.

Are they both using the same version of PHP?

You can check by accessing this page in Moodle:

http://your-moodle-server-here/moodle/admin/phpinfo.php

Thanks,

Ernie

Posted by Ernie Ghiglione

3: Re: Re: Moodle 1.8.3 and Lams 2.0.4
In response to 2 01/10/08 07:51 AM
[ Reply | Forward ]
Ernie, yes they are both using the same version of PHP. They are actually using the same install of PHP. They are setup as virtual servers under the same apache2 install.

According to the phpinfo page the http wrapper is not installed on either one, so it is mysterious why it works on 1.8, but not 1.8.3.

Posted by Dave Bauer

4: Re: Re: Moodle 1.8.3 and Lams 2.0.4
In response to 2 01/10/08 08:15 AM
[ Reply | Forward ]
I have two different versions of the lamsv2 activity!

This is the problem.

The version running with moodle 1.8 has this in lib.php
<?PHP // $Id: lib.php,v 1.3 2007/04/19 07:56:48 asukkar Exp $

The version running with moodle 1.8.3 has this in lib.php (I downloaded it yesterday)

<?PHP // $Id: lib.php,v 1.6 2008/01/07 07:28:49 ernieg Exp $

The version that works has a function called

lamstwo_get_sequences

the broken version has lamstwo_get_sequences_rest

which is apparently the problem. The older version does not use the http wrapper so, I do not get the error message.

Posted by Dave Bauer

5: Re: Re: Re: Moodle 1.8.3 and Lams 2.0.4
In response to 4 01/10/08 08:27 AM
[ Reply | Forward ]
I tried to use the older lamstwo activity on moodle 1.8.3 but that won't install correctly. I get to the install page and it says it created the tables, but the html page is cutoff and the continue button never appears. After that the moodle home page is empty!

This is the entire page I see when it installs lamstwo

No warnings - Scroll to the continue button
lamstwo
(mysql): SHOW TABLES (mysql): CREATE TABLE mdl_lamstwo ( id BIGINT(10) unsigned NOT NULL auto_increment, course BIGINT(10) unsigned NOT NULL DEFAULT 0, name VARCHAR(255) NOT NULL DEFAULT '', introduction TEXT NOT NULL, sequence_id BIGINT(20) DEFAULT 0, lesson_id BIGINT(20) DEFAULT 0, timemodified BIGINT(10) unsigned NOT NULL DEFAULT 0, CONSTRAINT PRIMARY KEY (id) )
Success

(mysql): ALTER TABLE mdl_lamstwo COMMENT='LAMS activity'
Success

(mysql): CREATE INDEX mdl_lams_cou_ix ON mdl_lamstwo (course)
Success

lamstwo tables have been set up correctly

Is there a way to download a previous version?

I downloaded from both mirrors, they are the same.
http://wiki.lamsfoundation.org/display/lams/Downloads#Downloads-moodle

Posted by Dave Bauer

6: Re: Re: Re: Moodle 1.8.3 and Lams 2.0.4
In response to 4 01/10/08 09:18 PM
[ Reply | Forward ]
Hi Dave,

The reason we opted for deprecate the lamstwo_get_sequences method was due to a problem when using single quotes in the name of the sequences and trying to render those using the tree tigra javascript component.

Additionally, the lamstwo_get_sequences call makes use of SOAP which also conflicted with some versions of PHP5 that were compiled with SOAP support. Also given that what we needed to pass back to Moodle from LAMS is just a simple xml file, we decided that a rest like call using normal http calls would be faster and much more effective that using the whole SOAP packaging.

On top of that, some old PHP4 implementation don't have DOM support to parse the XML documents, so we were force to introduce an external PHP library that wouldn't conflict with PHP5 but would work with old PHP4 versions as you can see in this thread.

So I feel that we can't win either way with PHP! :-S


OK, so my suggestions are to either get an old version of the module from CVS

cvs -d :pserver:anonymous@lamscvs.melcoe.mq.edu.au:/usr/local/cvsroot checkout temp_moodle_dev

Get a time tag earlier than October 4, 2007 (so that won't include the DOM changes i.e.: -D "2007-10-01"). However, you might face problems when users use the single quotes for sequences names

Or recompile PHP with the wrapper support and upgrade to the latest LAMS-Moodle packages. (see the attached file for details on the PHP options we use)

Let me know what you opt for.

Thanks,

Ernie

Posted by Ernie Ghiglione

Attachments:
Reply to first post on this page
Back to Problems Installing LAMS