Forum archive 2000-2006

Thomas Hagedorn - A different Hardcopy Problem

Thomas Hagedorn - A different Hardcopy Problem

by Arnold Pizer -
Number of replies: 0
inactiveTopicA different Hardcopy Problem topic started 7/23/2004; 3:23:31 PM
last post 9/24/2004; 4:17:42 PM
userThomas Hagedorn - A different Hardcopy Problem  blueArrow
7/23/2004; 3:23:31 PM (reads: 2497, responses: 12)
When trying to generate hardcopy we get the error:

The requested URL /webwork2_course_files/test_course/tmp/hardcopy/test_course.professor.Set4.pdf was not found on this server.

There is no directory /webwork2_course_files so I'm assuming that somewhere we didn't properly set the value

/local/webwork2/courses

where the courses live. If this is correct, where would this value be set? Also, where does one find the routines that generate hardcopy output?

Thanks, Tom

<| Post or View Comments |>


userSam Hathaway - Re: A different Hardcopy Problem  blueArrow
7/23/2004; 4:47:07 PM (reads: 2774, responses: 0)
This is somewhat complicated, so bear with me...

/webwork2_course_files is a URL. /local/webwork2/courses is a directory. These values correspond to the variables $webwork_courses_url and $webwork_courses_dir, respectively.

The code in the apache config file webwork.apache-config reads global.conf and uses those two values to construct the following AliasMatch directive:

AliasMatch $webwork_courses_url/([^/]*)/(.*) $webwork_courses_dir/$1/html/$2

In your case, this will map a URL like:

/webwork2_course_files/test_course/tmp/hardcopy/test_course.professor.Set4.pdf

...to the file:

/local/webwork2/courses/test_course/html/tmp/hardcopy/test_course.professor.Set4.pdf

If you look in your Apache error log, you will probably see lines like:

[Tue Jul 20 18:39:44 2004] [error] [client 68.9.129.75] File does not exist: /some/crazy/path/test_course/html/tmp/hardcopy/test_course.professor.Set4.pdf

In that case, the $webwork_courses_dir variable is set to /some/crazy/path instead of to /local/webwork2/courses. Edit global.conf to fix it.

If you see different error messages, or none at all, let me know.

<| Post or View Comments |>


userThomas Hagedorn - Re: A different Hardcopy Problem  blueArrow
7/23/2004; 6:30:31 PM (reads: 2771, responses: 0)
If it helps,

The error in the Apache log is [Fri Jul 23 18:16:44 2004] [error] [client 141.150.236.91] File does not exist: /local/webwork2/courses//html/

I checked global.conf and webwork.apache-config and the variable $webwork_courses_dir looks like it is set fine.

The "//html" part of the error message above made me look at our AliasMatch command. It's almost the same as the one above but we instead of $1 and $2, we have $1 and $2 (but with no spaces). I assume it's fine.

We have webwork.apache-conf.dist v 1.2 from 7/12/04 installed.

Thanks, Tom

<| Post or View Comments |>


userThomas Hagedorn - Re: A different Hardcopy Problem  blueArrow
7/23/2004; 6:31:16 PM (reads: 2744, responses: 0)
That should be \$1 and \$2 in the above message.

<| Post or View Comments |>


userMichael Gage - Re: A different Hardcopy Problem  blueArrow
7/23/2004; 7:58:38 PM (reads: 2736, responses: 0)
There probably is something wrong about the AliasMatch line in your config file. The error you show above shows that the course name is not being picked up. (The 'error' message should have been /local/webwork2/courses/COURSE_NAME/html/ where COURSE_NAME, in your case, should probably have been test_course.

My line looks like

AliasMatch $webwork_courses_url/([^/]*)/(.*) $webwork_courses_dir/\$1/html/\$2

<| Post or View Comments |>


userSam Hathaway - Re: A different Hardcopy Problem  blueArrow
7/23/2004; 8:58:17 PM (reads: 2758, responses: 0)
It looks like Frontier eats backslashes. The AliasMatch line should read:

AliasMatch $webwork_courses_url/([^/]*)/(.*) $webwork_courses_dir/\$1/html/\$2

That's backslash-dollarsign-one and backslash-dollarsign-two. :)

And it does read as such in the shipped webwork.apache-config file.

<| Post or View Comments |>


userThomas Hagedorn - Re: A different Hardcopy Problem  blueArrow
7/24/2004; 12:02:47 AM (reads: 2777, responses: 0)
I checked and the AliasMatch command (With \$1 and \$2) matches what you report. The only guess I can make is that the error might be because we aren't running the most current Webwork 2 version (ours is from 7/13). We're not going to update for another week or so (so as to not tax our IT support), so I'm going to wait and see if the upgrade fixes it.

Thanks, Tom

<| Post or View Comments |>


userSam Hathaway - Re: A different Hardcopy Problem  blueArrow
7/24/2004; 2:08:38 AM (reads: 2792, responses: 0)
Indeed, the config system changed significantly on 15-July! The system I described to you above is consistent with these changes (but sadly, not with your system... :) To summarize:

 

YET ANOTHER CONFIG CHANGE -- PLEASE READ.

This chagne allows command-line scripts to continue to work without
defining a bunch of environment variables. Hopefully this will be the
last change...

Now only $webwork_dir is set in webwork.apache-config. That file then
uses this value to read the course environment and get the rest of the
configuration values that it needs out of global.conf. global.conf now
has variables like $webwork_url, $pg_dir, etc. at the top.

In summary:

* In httpd.conf, include webwork.apache-config.
* In webwork.apache-config set $webwork_dir to the path to webwork2.
* In global.conf, set $webwork_url, $pg_dir, $webwork_htdocs_url,
$webwork_htdocs_dir, $webwork_courses_url, and $webwork_courses_dir.

<| Post or View Comments |>


userJun Wang - Re: A different Hardcopy Problem  blueArrow
9/23/2004; 1:12:09 AM (reads: 2626, responses: 0)
Tom,

Have you fixed the hardcopy problem? We now have a similiar problem when trying to generate a hard copy. The message says "page can not be found." The error_log shows the error:

[Wed Sep 22 23:44:12 2004] [error] [client 24.214.105.180] File does not exist: /usr0/opt/webwork2/courses//html/
uncaught exception in Apache::WeBWorK::handler: Course 'courses' not found: No such file or directory at /usr0/opt/webwork2/lib/WeBWorK.pm line 205.
[Wed Sep 22 23:45:02 2004] [error] [client 24.214.105.180] File does not exist: /usr0/opt/webwork2/courses//html/

The graphs in problems can not be displayed. when clicking on the graphic icon, a new page with URL: "http://lrc.alasu.edu:81/webwork2_course_files/MAT256/tmp/gif/professor-0-setUndefined_Setprob1image1.png' pops up but gives a message saying the "Page can not be found". But upon checking the directory ../courses/MAT256/html/tmp/gif/, the file IS there. The error_log reports error:

[Wed Sep 22 23:04:33 2004] [error] [client 24.214.105.180] File does not exist: /usr0/opt/webwork2/courses//html/

Like Mike said, the course name was not being picked up. But our AliasMatch line seems also fine. I can not locate where "webwork2_course_files" is defined. "webwork_files" works fine so the math equations are displayed correctly. We installed WeBWorK2.01.

I tried Zig's solution, it does not help us.

Jun

<| Post or View Comments |>


userJun Wang - Re: A different Hardcopy Problem  blueArrow
9/23/2004; 12:05:02 PM (reads: 2602, responses: 0)
Sorry, I take it back. Zig's solution solved our problem.

Jun

<| Post or View Comments |>


userMichael Gage - Re: A different Hardcopy Problem  blueArrow
9/23/2004; 1:14:59 PM (reads: 2592, responses: 0)
Hi Jun,

I'm loosing track of where things are. Can you give us a url pointing to Zig's solution?

Thanks.

--Mike

<| Post or View Comments |>


userJun Wang - Re: A different Hardcopy Problem  blueArrow
9/24/2004; 11:30:58 AM (reads: 2607, responses: 0)
Hi, Mike,

The URL is: http://webhost.math.rochester.edu/webworkdocs/discuss/msgReader$2492

I followed Zig's comment and it solve the image and hardcopy problems. Just as I thought that our installation was finally completed, another one popped up. Yesterday morning I created a new course and after I made the change, I asked our administrator to restart the mysql. After he did that, I successfully created a ModelCourse. Then the sql won't allow me to create more courses (no such problem before). After deleting the ModelCourse, I was allowed create a course named test but was not allowed to create any more. The existing courses work perfectly, but I am no longer able to increase the number of sql courses (database creation failed). I am waiting for our administrator. I will change things back and ask him to restart the sql and see if I can add more courses. It seems now that the sql installation may have some problems, but I know nothing about it. Hopefully our administrator will be able to correct the problems.

Jun

<| Post or View Comments |>


userJun Wang - Re: A different Hardcopy Problem  blueArrow
9/24/2004; 4:17:42 PM (reads: 2593, responses: 0)
The problem was that the directory where sql databases are created was out of spaces. The problem was resolved by put setting up a link to another place. Everything is fine at here, for now.

Jun

<| Post or View Comments |>