EnvironmentError: The environment options "TRAC_ENV" or "TRAC_ENV_PARENT_DIR"
or the mod_python options "TracEnv" or "TracEnvParentDir" are missing.

Yuck. What’s more, if you’re using SuExec (like I am) then your Apache directives are ignored.

Solution: Edit your trac.fcgi and prepend the following code.

# hack for SuExec
import os;
os.environ['TRAC_ENV_PARENT_DIR'] = ‘/var/lib/trac’
Tags: ,

4 Responses to “Getting SuExec and TRAC to play nice”

  1. #1 alek says:

    Why didn’t you add:

    PythonOption TracEnv /var/lib/trac

    in place in your virtual host config?

  2. #2 drax says:

    Because for security reasons, SuExec only allows certain environment variables to pass through to a script. “TRAC_ENV” is apparently, not one of them ;)

  3. #3 zenobio says:

    This is off-topic but very important.

    I was surfing the mirror@sweon and came across the madchat folder, specifically the vxdevl subfolder. And much to my amusement its description is “naissance intelligence cybernétique”. That’s such a relief and excitement. Until now, I was the only weirdo I knew who thought virii were the lost key to AI… what’s more, I just wrote a post at my blog outlining such outlandish beliefs, which I urge you to visit.

    I put the address in the website field. Please read and tell me what you think. I’m so glad to find like minds anyway… I’m baffled! XD

  4. #4 zenobio says:

    hey drax

    I answered your comment by (the means of a somewhat long) email. Thanks for dropping by.

Leave a Reply