Forum archive 2000-2006

Joe Borzellino - createDirectory error in welcomeAction.PL

Joe Borzellino - createDirectory error in welcomeAction.PL

by Arnold Pizer -
Number of replies: 0
inactiveTopiccreateDirectory error in welcomeAction.PL topic started 6/19/2002; 6:24:57 PM
last post 6/22/2002; 5:02:39 AM
userJoe Borzellino - createDirectory error in welcomeAction.PL  blueArrow
6/19/2002; 6:24:57 PM (reads: 1378, responses: 6)
I have pretty got Webwork up and running on OS X/Darwin, but I can't get the typeset versions of problem sets. When i first select do_problem_set button, I get the following error:

Error: /Library/WebServer/CGI-Executables/webwork/system/ cgi-scripts/welcomeAction.pl: createDirectory error

Can't do mkdir(/Volumes/MacOSX/webwork/system/courses/demoCourse/html/tmp/l2h/ screenSetHeader-77974/, 504)

When I check the error logs, the error is from line 492 in File.PL. I'm using the most recent WW 1.7 and template files.

Even with this error, I can get test and formatted-text (although formatted-text shows some strange characters) and can get PDF hardcopy that looks great.

A similar error occurs, when trying to get typeset versions of problems (via Latex2html).

Any ideas on what the problem might be. I'm guessing it's some kind of permission issue, but for the life of me, I can't track it down.

Thanks in advance,

Joe Borzellino

PS: I've been keeping a written record of the OS X installation of webwork and will pass along a how-to, if I can get past this hurdle. I've made it over several hurdles already so far!

<| Post or View Comments |>


userMichael Gage - Re: createDirectory error in welcomeAction.PL  blueArrow
6/20/2002; 1:59:45 AM (reads: 1585, responses: 1)
Hi Joe,

I just got MacOS X/Darwin going myself (but I haven't dared try to get Latex2HTML going yet!).

The strange characters in formatted-text mode are probably normal. tth does a fairly good job of creating an HTML facsimile of the mathematics but it doesn't hit the right font symbols for every browser. I'd like to see if we can't filter the output of tth to customize it for each browser. (You can run tth from the command line, filter it and pipe it through the browser for test purposes.)

As to the Latex problem. It also sounds like a permissions problem to me.

Have the tmp and l2h directories already been created? the FILE subroutine is not smart enough to build them (yet).

Does the webserver have permission to write in the l2h file? A quick test would be to set all of the permissions in the tmp directory to 777 and see if it works then.

I had a similar problem when I found that scripts/ gif2eps hadn't been given execution permissions.

Glad you're writing a howto, I look forward to reading it -- then I can get latex2HTML going.

Take care,

Mike

<| Post or View Comments |>


userArnold K. Pizer - Re: createDirectory error in welcomeAction.PL  blueArrow
6/20/2002; 2:26:26 AM (reads: 1579, responses: 0)
Almost certainly the problem is that Latex2html is not working correctly. First check that Latex2html is working correctly on your system. Try running latex2html from the command line on a tex source file, e.g.

latex2html myfile.tex

This will tell you if l2h is installed OK (actually it will tell you if it isn't --- if this works, probably (not certainly) l2h is installed OK).

If this works, the next most likely problem is that the path(s) given in the # Local external programs # section of Global.pm are not correct or sufficient. For example, one person had add to the path /usr/share/texmf/bin.

Note that when you test things, you should try viewing a problem and after a failure remove the cached latex2html image. There are several ways to do this. The indirect method is to change the modification time for the .pg file you were viewing (e.g. edit the file by adding and removing a space or just run touch) --- WeBWorK knows the .pg file has changed and will update the cached image. The direct method is to remove the cached image. Find the psvn number for the student and set, say set2 and psvn number 12345. Then remove demoCourse/html/tmp/l2h/set2/5-12345 for problem 5 of set 2. This assumes you haven't changed where the tmp directory for the course lives. Use rm -rf to remove the whole directory. Actually you can remove everything under demoCourse/html/tmp which is faster.

The point in removing the cached images is that once they are cached, webwork will just display them (basicaly just error messages) and not call latex2html again.

If the above does not solve the problem, you have to dig deeper.

Check the webserver's error log. This might point you to a problem such as: "my latex2html (98.2) expected METAFONT_DVI to be defined, so I got a division by 0 error. Once I put a definition for it into the init file, latex2html output was fixed." Some linux distributions come with l2h, but they do not define METAFONT_DVI and l2h divides by this! Also can look at the webwork error log (under system/logs/ ).

The next thing to try is setting $debug=1 in ../courseScripts/displayMacros.pl. Doing so will save intermediate temporary files (log files, TeX files, etc) that may help in finding the error. These files will be in a subdirectory of ... htm/tml/l2h/ Remember to reset $debug=0 when you get things working.

Finally, if necessaray, you can try the following: If the webserver is wwserver and you are root, you can su -l wwserver which means you can run commands as if you are the webserver. Try to run exactly the command that webwork does (in the sub makeL2H in displayMacros.pl) and see if anything fails.

<| Post or View Comments |>


userJoe Borzellino - Re: createDirectory error in welcomeAction.PL  blueArrow
6/20/2002; 9:09:57 AM (reads: 1840, responses: 0)
To answer some of the questions:

The tmp and l2h directories have been created, and some subdirectories were also created, namely setAlgebra1RealNumbers, but these directories are empty. the path to these is ../webwork/courses/demoCourse/html/tmp/l2h/.

I changed the tmp permissions to 777 and still no success with the mkdir from FILE.pl

Latex2HTML works fine from the command line directly. I typeset a fairly complicated paper of mine and it did a good job with it.

I removed the whole demoCourse/html/tmp and started over, same error.

The webserver is not generating an errors related to this problem. At least it's not writing them to the log. (I have many entries from some idiot trying to hack my machine though)

The webwork error logs have these:

ERROR (/Library/WebServer/CGI-Executables/webwork/system/cgi-scripts/welcomeAction.pl: createDirectory error) Thu Jun 20 13:1 5:53 2002: at /Volumes/MacOSX/webwork/system/scripts/FILE.pl line 492 ERROR (/Library/WebServer/CGI-Executables/webwork/system/cgi-scripts/processProblem8.pl: createDirectory error) Thu Jun 20 13 :16:03 2002: at /Volumes/MacOSX/webwork/system/scripts/FILE.pl line 492

I set the $debug=1 in /courseScripts/displayMacros.pl, but no files get written to the html/tmp/l2h directory

The last suggestion to su to www and execute, I can't do right now, since I don't know to parse the necessary line (I don't know any Perl really) I can figure out some of it, but not all.

One thing is that I can create the required directory from the command line directly. Since I chmod 777 the html/tmp directory, I would assume www would have write permission there also.

I have one question though, is the mkdir command in FILE.pl (or any perl script) a special perl version of mkdir, or is it the same one as the one in /bin from the system?

Thanks in advance for the help,

Joe

<| Post or View Comments |>


userArnold K. Pizer - Re: createDirectory error in welcomeAction.PL  blueArrow
6/21/2002; 4:44:42 AM (reads: 1564, responses: 0)
Hi Joe,

This is pretty weird. Since you set $debug=1 and no files were written, the problem is not with latex2html.

I remember that a long time ago on some system we saw an error that the command mkdir (or something similar) failed when the directory name was too long (maybe more than 64 or 72 characters?). Maybe this is the problem. Note that mkdir is a perl command which I think calls the system's mkdir command. Your directory name is certainly pretty long.

Can't do mkdir(/Volumes/MacOSX/webwork/system/courses/demoCourse/html/tmp/l2h/ screenSetHeader-77974/, 504)

(the permission 504 looks strange but is really a decimal version of the correct octal 0770 --- we should print this out as 0770 in the error message to prevent confusion).

One way to test this is to shorten the string. Prehaps the easiest way to to change in your webworkCourse.ph file $courseTempDirectory and $courseTempURL as we suggest for large courses. Here is an example. Note that /ww/htdocs/ is the webservers document root and in there we created the directories tmp/mth161/

#$courseTempDirectory = "${classDirectory}html/tmp/";
$courseTempDirectory = "/ww/htdocs/tmp/mth161/";

#$courseTempURL = "${htmlURL}tmp/";
$courseTempURL = "/tmp/mth161/";

Look at step 8 of http://webwork.math.rochester.edu/docs/docs/install/setup.html

<| Post or View Comments |>


userJoe Borzellino - Re: createDirectory error in welcomeAction.PL  blueArrow
6/21/2002; 10:55:57 PM (reads: 1574, responses: 0)
I think I got it all figured out, finally after many hours of parsing the various perl scripts. In fact the perl 5.6.0 version of mkdir, is not the same as the MacOSX/Darwin version. I changed the relevant line with the perl "system" construct to use the system version of mkdir directly, and lo and behold the directory was created. I needed to make a couple of other changes to some of the scripts, but now at least I seem to have full functionality of the demoCourse under Webwork running on OS X. I need to do more testing to see if any other scripts need adjustment. I am going to now focus on turning my installation notes into a useful how-to for installation on OS X, along the lines of the linux install notes. When it's ready, I'll be happy to share it with any who are interested.

<| Post or View Comments |>


userMichael Gage - Re: createDirectory error in welcomeAction.PL  blueArrow
6/22/2002; 5:02:39 AM (reads: 1552, responses: 0)
That's excellent, Joe. I'm glad it's working out.

When you are ready we'd love to have a copy of the installation notes to post along with the Linux setup notes. If you write in HTML you can simply post the HTML source to the discussion group and I (or another editor) can easily turn it into a posted page. (We only need the HTML code between the <body> and </body> statements. The header is provided by the CMS-content management system- we use called Frontier. You can use dreamweaver or some other app to write the HTML, but cut off the part above and including <body> and below and including </body>.)

For example you can view the Linux install instructions in its posted form at http://webhost.math.rochester.edu/webworkdocs/discuss/msgReader$677.

This will also enable you, (and site editors) but no-one else, to make corrections to your instructions. The corrections will immediately be reflected in the postings on webhost.math.rochester.edu and will propagate to the static site at webwork.math.rochester.edu the next time material is uploaded to the static site.

Both Arnie and I will be out of town for the first 3 weeks in July, so don't expect quick replies or action during that period.

Thanks for getting all of this working on MacOS X, particularly the Latex2HTML feature. I and many other users will be interested in this.

Take care,

Mike

<| Post or View Comments |>