## Forum archive 2000-2006

### John Jones - Notes on installing ww2 preview 3

by Arnold Pizer -
Number of replies: 0
 Notes on installing ww2 preview 3 topic started 4/1/2004; 10:58:27 AMlast post 4/16/2004; 1:42:38 PM
 John Jones - Notes on installing ww2 preview 3  4/1/2004; 10:58:27 AM (reads: 3436, responses: 23) I just completed installation of WW2 preview release 3 on a system.  I used Bill's instructions on setting up a second copy of apache so I wouldn't disrupt active courses in the process.  The one thing I would add to Bill's instructions is to change the port number for the second apache installation, so you can run both versions of apache simultaneously. Here are some of the problems I encountered in the process.  I think they all can be fixed by adjusting the installation documentation. I was following the instructions at http://devel.webwork.rochester.edu/twiki/bin/view/Webwork/PreviewRelease3 These are the instructions pointed to by the preview-release announcement. In installing perl modules, I had trouble with Apache::Request (it seemed that files for some test did not exist, so test failed) but no trouble with Time::HiRes.  It was a little disconcerting during the perl module installation to have it ask me questions I didn't know the answer to.  More detailed information on this might be good for when it is a regular release instead of a preview. Some directories are not part of the preview release tarball (e.g. DATA). When setting their permissions, I naturally got an error.  I created them and then all seemed ok. During Apache Setup, going to /webwork2 with my web browser worked to a certain extent.  I got an error page with message Failed to read course environment for : failed to read file /ud/webwork/ww2/webwork2/conf/global.conf: No such file or directory at /ud/webwork/ww2/webwork2/lib/WeBWorK/Utils.pm line 85. This was different from the apache error page (which I got when I made a mistake all on my own), so to a certain extent, this is success.  If this is what is expected, the documentation should say so.  I don't think there was an earlier instruction about making global.conf from global.conf.dist, so I suppose this is "expected". The file global.conf is not discussed until the System Configuration part of the instructions.  I don't recall the instructions saying to copy global.conf.dist to global.conf (and similarly for database.conf.dist). When trying to set up the test course, I got the errorWEBWORK_ROOT not found in environment. The instructions about setting that don't come until later, in the MiscConfig part of the instructions. John<| Post or View Comments |>

 John Jones - Re: Notes on installing ww2 preview 3  4/1/2004; 11:14:50 AM (reads: 3648, responses: 0) I had an error, then it disappeared.  Never mind.John <| Post or View Comments |>

 John Jones - Re: Notes on installing ww2 preview 3  4/1/2004; 11:55:21 AM (reads: 3661, responses: 1) In ww2, how do you change a student's password? John<| Post or View Comments |>

 Zbigniew Fiedorowicz - Re: Notes on installing ww2 preview 3  4/1/2004; 12:08:58 PM (reads: 3649, responses: 0) Are you using Apache 2.0 or 1.3x in this installation?<| Post or View Comments |>

 Sam Hathaway - Re: Notes on installing ww2 preview 3  4/1/2004; 1:00:18 PM (reads: 3681, responses: 0) John, Thanks for the feedback. -sam <| Post or View Comments |>

 John Jones - Re: Notes on installing ww2 preview 3  4/1/2004; 1:53:38 PM (reads: 3674, responses: 1) This is apache 1.3.29. The error I recanted above is back.  I get the generic apache error screen, and in the apache error log file I getUndefined subroutine &Apache::WeBWorK::handler called. I have no previous experience with mod_perl, but my guess is that there had been an error in perl which threw it completely out of whack so that it could no longer find the function above (presumably because @INC had reverted back to a default value).  When I back up a few pages and load again, mod_perl has reset itself and a page which previously had errors is now ok.  Does that sound right? I have been getting lots of errors/warnings as I try to build a few problem sets.  So, I updated the files from cvs so that I don't end up reporting bugs which have already been fixed.  I'll post about the errors I get in new threads. John <| Post or View Comments |>

 John Jones - Re: Notes on installing ww2 preview 3  4/1/2004; 3:05:54 PM (reads: 3685, responses: 0) By the way, after updating to cvs files, I found the button for changing a student's password. John<| Post or View Comments |>

 John Jones - Re: Notes on installing ww2 preview 3  4/1/2004; 3:14:00 PM (reads: 3644, responses: 0) On more question on installation issues. First, I found that I had to create the directory for the equation cache and set its permissions. Next up, I looked at a problem which has an on-the-fly graph in it.  The error is that it cannot find the graph.  I can see that the png image was made.  Under webwork 1, I understand how this works via a symlink to the course html directory.  In WW2, are there supposed to be links set up into each course's html directory, or is webwork supposed to be doing some magic the paths to make it work out? John<| Post or View Comments |>

 Sam Hathaway - Re: Notes on installing ww2 preview 3  4/1/2004; 4:07:24 PM (reads: 3896, responses: 0) Hi John, First, your error message:Undefined subroutine &Apache::WeBWorK::handler called. This happens when Apache couldn't compile Apache::WeBWorK or one of it's dependancies (WeBWorK, WeBWorK::*). If you're getting this on some requests and not others, it's probable that you need to restart your apache server. Apache maintains a compiled version of the loaded Perl modules in each child process. These are only loaded when the child starts, not when the module code is changed, so if you change the code (a CVS update, for example), you need to restart the server. ("apache graceful" should be sufficient.) Second, your graph problem. The method we recommend for pointing apache to course-specific temp files is as follows (from the wiki topic ApacheSetup): # Provide access to course-specific resources:# AliasMatch /webwork2_courses/([^/]*)/(.*) /opt/webwork2/courses/$1/html/$2 Options FollowSymLinks AllowOverride None Unfortunately, the necessary change to $courseURLRoot (global.conf line 112) didn't make it into PR3 (just like the several directories we omitted!). As of 2.0 PR3, the default was:my$courseURLRoot = "$webworkURLs{htdocs}/courses/$courseName"; but since then, we've changed it to:my $courseURLRoot = "/webwork2_courses/$courseName"; HTH. -sam <| Post or View Comments |>

 John Jones - Re: Notes on installing ww2 preview 3  4/1/2004; 4:22:49 PM (reads: 3619, responses: 0) Hi Sam, I had done the apache part, but when I upgraded from PR3 to the cvs version, I didn't touch my already-configured global.conf.  Changing it as you outlined above fixed the on-the-fly graph problem. John<| Post or View Comments |>

 John Jones - Re: Notes on installing ww2 preview 3  4/1/2004; 9:17:06 PM (reads: 3664, responses: 0) Hi, Here are a couple of more minor installation things which should be fixed up.  Some course related files should be created by the default installation process (or not signal errors if they are not found).  The ones I saw so far are the default e-mail message and the default course message. I created a simple course_info.txt file and saved it, and gave it generous permissions.  Its contents are displayed correctly.  Then, I click on the link to Edit it, and get the problem editor page (so far so good), but the contents of the file are not show.  Instead, the text box contains:failed to read file /ud/webwork/ww2/webwork2/courses/Linear_Algebra/templates/course_info.txt: No such file or directory at /ud/webwork/ww2/webwork2/lib/WeBWorK/Utils.pm line 86. The path to the file is correct.  Webwork can read it since it displays the contents on the problem set list page. It gets stranger (from my perspective).  I put some diagnostics in Utils.pm which write information to a file, restarted apache, and tried again.  It reports trying to read ur.template, but not the file in question. John<| Post or View Comments |>

 Michael Gage - Re: Notes on installing ww2 preview 3  4/2/2004; 1:12:44 AM (reads: 3860, responses: 0) On the "Instructor Tools" page there is a button saying "reset password". If you have selected a student in the panel below you are allowed to reset the password for that student. If no student is selected you are prompted to change your own password. Recently Sam has reworked the UI of the instructor's page -- so if you are looking at the current CVS version, the button appears below the panel in which you select the student and is labeled "Change selected user's password" If no student is selected you get an error message. I think Sam's version is less confusing than mine was. Hope this helps. <| Post or View Comments |>

 John Jones - Re: Notes on installing ww2 preview 3  4/2/2004; 9:15:52 AM (reads: 3669, responses: 0) Hi, I did find the reset password button in the cvs version.  That one seemed more straightforward. On my most recent post above, I realized that I made an error as to what was getting called from readFile in Utils.pm.  This comes by openning a file and appending to it the name of the file requested.  I do this before the function might exit with a "die". When WW displays the message along with the list of problem sets, my log file shows the course message being read.  So far so good.  When I click to edit the file, the files which it tries to read are: /ud/webwork/ww2/webwork2/conf/global.conf/ud/webwork/ww2/webwork2/courses/Linear_Algebra/course.conf/ud/webwork/ww2/webwork2/courses/Linear_Algebra/templates/course_info.txt.jjones.tmp/ud/webwork/ww2/webwork2/conf/templates/ur.template So, it still doesn't seem to be trying to read .../course_info.txt, when it generates that page, so this is still pretty bizarre given the message produced as the contents of the file.  My mistatement above was that only ur.template was being read. John <| Post or View Comments |>

 John Jones - Re: Notes on installing ww2 preview 3  4/2/2004; 10:11:28 AM (reads: 3642, responses: 0) OK, the mystery of editting the course_info file is now resolved.  Before I created the file, I tried to edit it through WW.  Webwork produced the message about being unable to read the file (since it didn't exist yet), and put that in the temporary file.  The temporary file was not cleaned up. I subsequently editted the course_info file by hand.  When I then went to edit it through WW, WW saw the temporary file and used that without looking at the original file. My suggestions for making this less confusing should anyone else go down this road are:don't put the error message into the temporary file.  If the file doesn't exist it is reasonable to alert the user on the web page, but start from an empty file.In retrospect, I understand why you might use the temporary file over the actual file, but I would only do that if the temporary file was written more recently than the real file.  If the real file is newer, then I would assume the temp file is out of date and should be discarded. John<| Post or View Comments |>

 Thomas R. Shemanske - Re: Notes on installing ww2 preview 3  4/8/2004; 10:04:28 AM (reads: 3658, responses: 0) I had ww2pr3 up and rendering problems and hardcopy, but hadn't tried any instructor funtions.After reading John Jones comments, I decided to grab the CVS version (two days ago) todo further testing with courses. I am getting some intermittent errors.Sometimes when I go to the instructor Tools page I get the errors:Unknown errorCompilation failed in require at/var/webwork2/lib/WeBWorK/HTML/ScrollingRecordList.pm line 30.BEGIN failed--compilation aborted at/var/webwork2/lib/WeBWorK/HTML/ScrollingRecordList.pm line 30.Compilation failed in require at/var/webwork2/lib/WeBWorK/ContentGenerator/Instructor/Index.pm line 31.BEGIN failed--compilation aborted at/var/webwork2/lib/WeBWorK/ContentGenerator/Instructor/Index.pm line 31.Compilation failed in require at (eval 869) line 1.Sometimes I get a valid page, but with very little on it. In particularthe change password link is not there.If I get the page with errors, then visit add users, then return toIntructor Tools I get the valid page, but with no visible optionsSet Assigner also gives errors"scrollingRecordList" is not exported by theWeBWorK::HTML::ScrollingRecordList moduleCan't continue after import errors at/var/webwork2/lib/WeBWorK/ContentGenerator/Instructor/Assigner.pm line 29BEGIN failed--compilation aborted at/var/webwork2/lib/WeBWorK/ContentGenerator/Instructor/Assigner.pm line 29.Compilation failed in require at (eval 577) line 1.though when I figured out how to build the initial set, I am sure I wasable to get to this page.Ideas appreciated.ThanksTom <| Post or View Comments |>

 Thomas R. Shemanske - Re: Notes on installing ww2 preview 3  4/9/2004; 3:18:44 PM (reads: 3639, responses: 0) Well, I am bit confused here about the CVS layout. To double check, I checked out current CVS versions of webwork-modperl and pg, and did a fresh installation.  I *am* getting faster at this. I can see no problems with perms. I can view problems and obtain pdf hardcopy There is a file called ScrollingRecordList.pm in /lib/WeBWorK/HTML There are three files in /lib/Utils/, but none of them are named scrollingList.pm Missing a file in CVS? T<| Post or View Comments |>

 Michael Gage - Re: Notes on installing ww2 preview 3  4/9/2004; 3:39:48 PM (reads: 3619, responses: 0) Sorry, I meant ScrollingRecordList.pm Line 30 of ScrollingRecordList.pm refers to use WeBWorK::Utils::FormatRecords qw/getFormatsForClass formatRecords/; Are the permissions on Utils.pm ok? It should sit next to the directory Utils. Does relaunching the apache server changes the errors from intermittent errors to predictable ones? If not, then I'll have to think more about this. <| Post or View Comments |>

 Thomas R. Shemanske - Re: Notes on installing ww2 preview 3  4/9/2004; 4:13:40 PM (reads: 3600, responses: 0) Nothing special is specified in the Wiki about perms; they are all readable. drwxr-xr-x    3 root     root         4096 Apr  7 08:14 Utils -rw-r--r--    1 root     root        10233 Apr  4 23:58 Utils.pm The errors are predictable, not intermittent.  It' s just that under some circumstances I get the page of errors listed above, and under other circumstances I get a page rendered.  Here is a reproducible set of steps. login as instructor Immediately select Instructor Tools (get the error listed above) Now select Add Users (page is ok) Now go back to Instructor Tools (page renders though it's empty except for the sidebar and the line Instructor's tools, that is no further content) Now choose Set Assigner (get the errors listed above) Go back and select Add Users, then Set Assigner and get a rendered page with side bar and the line Set Asigner (no other content to the page) T<| Post or View Comments |>

 Sam Hathaway - Re: Notes on installing ww2 preview 3  4/10/2004; 1:28:36 PM (reads: 3580, responses: 1) Tom, Have you updated recently? I'm unable to reproduce this with the current CVS. -sam <| Post or View Comments |>

 Thomas R. Shemanske - Re: Notes on installing ww2 preview 3  4/10/2004; 3:48:17 PM (reads: 3844, responses: 0) Yes; I did a fesh checkout of pg and webwork-modperl on 4/9, did a fresh install, and the problems were as described above T<| Post or View Comments |>

 Thomas R. Shemanske - Re: Notes on installing ww2 preview 3  4/12/2004; 2:16:35 PM (reads: 3575, responses: 0) Ok, it is *definitely* not perms.  I tarred up a copy as configured and did a chmod -R 777 webwork2 and the error messages persist as above. T<| Post or View Comments |>

 Michael Gage - Re: Notes on installing ww2 preview 3  4/12/2004; 7:21:08 PM (reads: 3600, responses: 0) It still seems to me as though the file WeBWorK::Utils::FormatRecords.pm is not being located. That is why require fails on line 30 of WeBWorK::HTML::ScrollingRecordList.pm Can you run perl on the FormatRecords.pm file directly and get it to compile? --Mike <| Post or View Comments |>

 Thomas R. Shemanske - Re: Notes on installing ww2 preview 3  4/16/2004; 1:42:38 PM (reads: 3559, responses: 0) This issue has been resolved.  There was a syntax "convention" which affected two files in  /webwork2/lib/WeBWorK/Utils: FormatRecords.pm  and SortRecords.pm It was version 5.8.0 of Perl that was complaining. The convention has been adjusted in CVS T<| Post or View Comments |>