Edgewall Software
Modify

Opened 18 years ago

Closed 18 years ago

#4424 closed defect (duplicate)

Enscript not working after change to mod_python

Reported by: jc@… Owned by: Christopher Lenz
Priority: normal Milestone:
Component: web frontend/mod_python Version: 0.10.3
Severity: normal Keywords:
Cc: Branch:
Release Notes:
API Changes:
Internal Changes:

Description

I changed from fgci to mod_python (because then I can bind the Trac to www.myhost.com/, with fcgi I need an script alias e.g.www.myhost.com/trac) But then I noticed that trac cannot span any external programs e.g. htmldoc for the pdf plugin, or enscript for beautify.

Here a log snippet from an enscript call:

2006-12-19 06:34:43,560 Trac[__init__] WARNING: HTML preview using <trac.mimevie
w.enscript.EnscriptRenderer object at 0xa93aa88c> failed ([Errno 2] No such file
 or directory: '/tmp/tmpuzLyax')
Traceback (most recent call last):
  File "/var/lib/python-support/python2.4/trac/mimeview/api.py", line 448, in re
nder
    filename, url)
  File "/var/lib/python-support/python2.4/trac/mimeview/enscript.py", line 138,
in render
    np = NaivePopen(cmdline, content.encode('utf-8'), capturestderr=1)
  File "/var/lib/python-support/python2.4/trac/util/__init__.py", line 142, in _
_init__
    outfd = file(outfile, 'r')
IOError: [Errno 2] No such file or directory: '/tmp/tmpuzLyax'

The Apache 2.2 is running on a debian (and with fcgi everything works fine!) with trac 0.10 (Debian Etch)

PS: Am unsure about the component… so first assigned to mod_python?! because it works if not using mod_python.

Attachments (0)

Change History (5)

comment:1 by Christian Boos, 18 years ago

Resolution: duplicate
Status: newclosed

Probably a SELinux issue, see #2231, Noah's comment. Please follow-up there.

comment:2 by Matthew Good, 18 years ago

Resolution: duplicate
Status: closedreopened

Based on the follow-up on #2231 SELinux is not installed, so this isn't a duplicate.

Note that mod_python is not required to host Trac at myhost.com/, you can do this with fcgi like:

ScriptAlias / /usr/lib/cgi-bin/trac.fcgi

comment:3 by jc@…, 18 years ago

Oh that was new to me, in the past a "ScriptAlias / …" to a cgi was not allowed/working. But anyway, that would lead me to another problem, that I then cannot reach some folders e.g. media/photos/svn which I setup as follows

<LocationMatch /(photoCache|icons)>
   SetHandler None
   Options +Indexes
</LocationMatch>

As far as I know you cannot say "noscript" ;) for some locations. (but I'm maybe wrong)

So currently I have the Trac installed under /cms and do a rewrite from / to /cms if the url is not inside (photos|cms|svn|…).

Ok ugly workaround but works perfect for me. And it doesn't solve the system call problem inside the mod_python.

in reply to:  2 comment:4 by Christian Boos, 18 years ago

Replying to mgood:

Based on the follow-up on #2231 SELinux is not installed, so this isn't a duplicate.

Well, #2231 is not necessarily about SELinux (that was just an hypothesis there), but rather about "Trac do not locate Enscript temp file", which is exactly the subject here. Moreover, comment:ticket:2231:5 already contains a stack trace exactly similar to the one reported here.

comment:5 by Christian Boos, 18 years ago

Resolution: duplicate
Status: reopenedclosed

Duplicate of #2231 (for the reasons mentioned above).

Modify Ticket

Change Properties
Set your email in Preferences
Action
as closed The owner will remain Christopher Lenz.
The resolution will be deleted. Next status will be 'reopened'.
to The owner will be changed from Christopher Lenz to the specified user.

Add Comment


E-mail address and name can be saved in the Preferences .
 
Note: See TracTickets for help on using tickets.