P
P
Puma Thailand2012-03-06 18:53:44
Python
Puma Thailand, 2012-03-06 18:53:44

Installing trac in apache breaks php and in particular phpmyadmin?

I push trac into apache like this
<Location /trac>…
SetHandler mod_python
SetEnv TRAC_ENV /home/trac
PythonHandler trac.web.modpython_frontend PythonOption
TracEnv /home/trac
PythonOption TracUriRoot /trac
"<//Location>"
eat it.
When contacting phpmyadmin, I get a 500 error in the logs, I see that it is trying to process the request trac and not phpmyadmin
[Tue Mar 06 15:46:48 2012] [error] [client myip] mod_python (pid=476, interpreter='ip-10- 194-30-45.ec2.internal', phase='PythonHandler', handler='trac.web.modpy
thon_frontend'): Application error
[Tue Mar 06 15:46:48 2012] [error] [client myip] DocumentRoot :'
[Tue Mar 06 15:46:48 2012] [error] [client myip] URI: '/'
[Tue Mar 06 15:46:48 2012] [error] [client myip] Location: None
[Tue Mar 06 15: 46:48 2012] [error] [client myip] Directory: None
[Tue Mar 06 15:46:48 2012] [error] [client myip] Filename: '/usr/share/phpMyAdmin/'
[Tue Mar 06 15: 46:48 2012] [error] [client myip] PathInfo: ''
[Tue Mar 06 15:46:48 2012] [error] [client myip] Traceback (most recent call last):
[Tue Mar 06 15:46: 48 2012] [error] [client myip] File "/usr/lib64/python2.6/site-packages/mod_python/importer.py", line 1537, in HandlerDispatch\n default=
default_handler, arg=req, silent=hlist .silent)
[Tue Mar 06 15:46:48 2012] [error] [client myip] File "/usr/lib64/python2.6/site-packages/mod_python/importer.py", line 1229, in _process_target\n result =
_execute_target (config, req, object, arg)
[Tue Mar 06 15:46:48 2012] [error] [client myip] File "/usr/lib64/python2.6/site-packages/mod_python/importer.py", line 1128, in _execute_target\n result =
object(arg)
[Tue Mar 06 15:46:48 2012] [error] [client myip] File "/usr/lib/python2.6/site-packages/trac/web/modpython_frontend .py", line 152, in handler\n gateway.run
(dispatch_request)
[Tue Mar 06 15:46:48 2012] [error] [client myip] File "/usr/lib/python2.6/site-packages/ trac/web/wsgi.py", line 89, in run\n response = application(self.en
viron, self._start_response)
[Tue Mar 06 15:46:48 2012] [error] [client myip] File "/usr/lib/python2.6/site-packages/trac/web/main.py", line 446, in dispatch_request\n raise EnvironmentError : The environment options "
TRAC_ENV
" or "TRAC_ENV_PARENT_DIR" or the mod_python options "TracEn
v" or "TracEnvParentDir" are missing. Trac requires one of these options to locate the Trac environment(s).
Moved phpmyadmin to a separate port, to a separate virtual host, just in case . Once you remove the trace
lines, how everything works. Trac itself also works.
Os centos 6.2
httpd-2.2.22-
mod_python-3.3.1

Answer the question

In order to leave comments, you need to log in

2 answer(s)
E
Evgeny Ilin, 2012-03-07
@opium

working example.
if necessary, I will throw off the configs of a separate host in /etc/apache2/sites-enabled/trac ps closing tags need to be corrected
<VirtualHost *:8000>
DocumentRoot "/var/trac"
ServerName spbnord-dev.ru
<Location />
# настройка окружения для Trac
SetHandler mod_python
PythonInterpreter main_interpreter
PythonHandler trac.web.modpython_frontend
PythonOption TracEnv /var/trac/bla-bla.ru
PythonOption TracUriRoot /
# ограничение доступа к Trac
AuthType Basic
AuthName "Trac Server"
AuthUserFile /etc/apache2/trac.passwd
Require valid-user
<\/Location>
<\/VirtualHost>

C
charon, 2012-03-07
@charon

very strange. It feels like you're not telling us something about the settings. Well, as an option, try using Directory instead of Location - both for phpmyadmin and for the truck

Didn't find what you were looking for?

Ask your question

Ask a Question

731 491 924 answers to any question