At 14:26  +0800 2009/02/01, Chris Burke wrote:
>Joey K Tuttle wrote:
>>  Last June, I puzzled out how to get j602 to run for Apache users on
>>  one of my web servers. Then I forgot what the trouble was and when I
>>  recently wanted to move to j602 on my main server, I struggled for
>>  several hours before figuring it out again.
>>
>>  Basically, the problem comes about because j602 wants to create a
>>  folder (by default j602-user) in the user's home directory. This is
>>  done early on in the profile.ijs script, in the lines:
>>
>>  home=.    >(systype-5){(2!:5'HOME');(2!:5'USERPROFILE');'\My Documents'
>>  userx=.   '\j',('64-'#~16={:$3!:3[2),'602-user'
>>  user=.    home,userx
>>
>>  The problem is that because the "user" Apache doesn't have a home
>>  directory or even the ability to login as a shell user, (2!:5'HOME')
>>  returns a NUMERIC 0. Then the line trying to do home,userx gets a
>>  domain error and that appears as quite a mysterious error in the
>>  browser window calling the CGI... Is there some reason a numeric is
>>  returned instead of a character string (or empty)?
>>
>>  One workaround is to modify profile.ijs to put a valid "home
>>  directory" in the case where a 0 is returned. Another (and the one I
>>  am using) does a
>>
>>  SetEnv HOME /tmp   # or some other usable directory
>>
>>  in the /etc/httpd/conf/httpd.conf configuration file. I used to have
>>  to put JPATH information into the Apache environment, and that
>>  changed with each release - so j602 was a great step forward, but
>>  does still require Apache knowing about it.
>
>I prefer to fix profile.ijs, as in:
>
>   home=. >(home-:0){home;'/temp'
>
>since this fixes the problem for other users.
>
>A good place to document this is in wiki page
>http://www.jsoftware.com/jwiki/Guides/CGI , which needs updating for
>j602 anyway.
>
Your suggested profile.ijs change is almost exactly what I put in 
before thinking more about it. The only difference was /tmp instead 
of /temp (spelling in Unix systems). Finding the source of trouble 
caused by the different spelling would be as confusing as my original 
quest.... Happily, my Apache environment setting would override with 
the correct spelling and I shouldn't need to pull hair on the next 
release.

- joey

----------------------------------------------------------------------
For information about J forums see http://www.jsoftware.com/forums.htm

Reply via email to