Loading pyROOT in apache

Hi,

I would like to import pyROOT inside my python scripts I use with my apache server user.

I can import ROOT in my python scripts without problems when I am logged with my user.

I try to add the following in my script to load the environment from root 5.34/32, which seems to be working fine.

I launch the following python script from a PHP file

[code]import os
import pprint
import subprocess

command = [‘bash’, ‘-c’, ‘source /programas/root34.32/root/bin/thisroot.sh && env’]

proc = subprocess.Popen(command, stdout = subprocess.PIPE)

for line in proc.stdout:
(key, _, value) = line.partition("=")
os.environ[key] = value

proc.communicate()

pprint.pprint(dict(os.environ))[/code]

but when I add

the script stops there. Do you have any idea of what I might be missing? All env variables seem to have been set properly by thisroot.sh script.

I dont see another solution than puting the environment variables defining ROOT instalation in /etc/apache2/envvars. That works!