I'm trying to change a Trac setup that had just one project into a
setup that host multiple (well, two) projects and I'm having trouble.
I'm running an apache2 and CGI style install. I'm seen mentioned that
you have to set TRAC_ENV_PARENT_DIR environment variable to a parent
directory that (I'm guessing here, the docs are not clear) contains
the actual trac environment directories.
My current (single) trac environment dir was directly in the home dir
of a user 'x', and to test out the TRAC_ENV_PARENT_DIR I created a new
directory in '~x' and and moved the environment dir into it, then I
created another trac environment dir "next to" it in the same new
parent dir.
I then changed the 'SetEnv TRAC_ENV' directive in my apache2 config to
point to the new location of the old environment dir. I'm doing this
before trying to set the TRAC_ENV_PARENT_DIR variable just to check
that things are working like I expect them to.
But they are not working like I expect them to. Having moved the
environment dir, edited apache's config to point the TRAC_ENV var at
the new location of the enviroment dir, and restarted apache, I get
the following traceback when I reload what should be the main page:
Oops...
Trac detected an internal error:
[Errno 2] No such file or directory: '/home/x/xtrac.env/VERSION'
Traceback (most recent call last):
File "/var/www/web2/cgi-bin/trac.cgi", line 20, in ?
cgi_frontend.run()
File "/usr/lib/python2.4/site-packages/trac/web/cgi_frontend.py",
line 123, in run
env = get_environment(req, os.environ, threaded=False)
File "/usr/lib/python2.4/site-packages/trac/web/main.py", line 335,
in get_environment
return _open_environment(env_path, threaded)
File "/usr/lib/python2.4/site-packages/trac/web/main.py", line 44,
in _open_environment
return open_environment(env_path)
File "/usr/lib/python2.4/site-packages/trac/env.py", line 374, in
open_environment
env = Environment(env_path)
File "/usr/lib/python2.4/site-packages/trac/env.py", line 81, in
__init__
self.verify()
File "/usr/lib/python2.4/site-packages/trac/env.py", line 129, in
verify
fd = open(os.path.join(self.path, 'VERSION'), 'r')
IOError: [Errno 2] No such file or directory: '/home/x/xtrac.env/
VERSION'
Where ''/home/x/xtrac.env' is the OLD location of the enviroment dir.
If I move the dir back to that path and reload, the page appears
fine. This despite the fact that the apache config contains the NEW
location:
SetEnv TRAC_ENV '/home/x/TRACs/xtrac.env'
I'm running as a virtual server, here's the trac-related part of the
<VirtualHost> directive:
ScriptAlias /trac /var/www/web2/cgi-bin/trac.cgi
<Location '/trac'>
SetEnv TRAC_ENV '/home/x/TRACs/xtrac.env'
# SetEnv TRAC_ENV_PARENT_DIR '/home/xerblin/TRACs'
</Location>
<Location '/trac/login'>
AuthType Basic
AuthName 'Trac'
AuthUserFile /home/x/TRACs/xtrac.env/trac.htpasswd
Require valid-user
</Location>
Any idea what's going wrong here? I'm pretty sure I'm not setting the
TRAC_ENV var anywhere else. Is there some sort of invisible cache
somewhere that's storing the wrong environment path?
--~--~---------~--~----~------------~-------~--~----~
You received this message because you are subscribed to the Google Groups "Trac
Users" group.
To post to this group, send email to [email protected]
To unsubscribe from this group, send email to [EMAIL PROTECTED]
For more options, visit this group at
http://groups.google.com/group/trac-users?hl=en
-~----------~----~----~----~------~----~------~--~---