Edgewall Software
Modify

Ticket #3112 (closed defect: invalid)

Opened 6 years ago

Last modified 5 years ago

Trac's mod_python frontend doesn't work with php5

Reported by: perchr-trac@… Owned by: cmlenz
Priority: normal Milestone:
Component: web frontend/mod_python Version: 0.9.4
Severity: normal Keywords: php5
Cc:
Release Notes:
API Changes:

Description

When trying to use Trac on my Apache-server (Apache/2.0.55 (Unix) mod_ssl/2.0.55 OpenSSL/0.9.8a DAV/2 SVN/1.3.1 mod_python/3.2.8 Python/2.4.3 PHP/5.1.2) it generates a 500 Internal Server Error. If I unload the php-module (without changing anything else) it suddenly works.

In error.log:
[Wed May 03 16:52:38 2006] [error] [client 139.164.130.171] PythonHandler? trac.web.modpython_frontend: OperationalError?: unsupported file format

Attachments

Change History

comment:1 Changed 6 years ago by athomas

  • Resolution set to invalid
  • Status changed from new to closed

This is a linking problem, and really has nothing to do with Trac. Essentially, two different versions of the same library are being linked in to the Apache process. Most likely sqlite, as it is included with PHP and dynamically linked in by Trac through pysqlite.

comment:2 Changed 6 years ago by anonymous

  • Resolution invalid deleted
  • Status changed from closed to reopened

I have this problem too.
Okay, it has nothing to do with Trac.
But is it anyone here who knows what can be done with it?

comment:3 Changed 6 years ago by Markus Tacker <m@…>

  • Resolution set to invalid
  • Status changed from reopened to closed

Support and installation questions should be asked on the mailing list or IRC channel, not filed as tickets.

comment:4 Changed 6 years ago by cboos

  • Keywords php5 added

… though I doubt anyone there would be able to give you an answer,
as this problem seems to be an open question, AFAIK.

If someone can prove me wrong, it would be nice to drop a reference
here to the place explaining what's happening, and what could be done
(besides disabling that php5 module that nobody needs anyway :) ).

comment:5 Changed 6 years ago by cboos

At least, I will propose one guess, as the PySqlite troubleshooting
page says about the OperationalError?: unsupported file format:

This probably is symptomatic of a mismatch between the SQLite library and the SQLite database format.

Then it could be that this php5 module was dynamically linked against another
SQLite library, maybe a 3.2.x something, and your trac db was created with a
sqlite3 ≥ 3.3.3.

In a similar way, when the two sqlite3 libraries are too different,
you could also see a segfault (#2489).
But as I said in the previous comment, those are mostly suppositions,
I never had such a crash at hand to investigate myself, nor did I found
an explanation elsewhere on the Web. What you find pretty easily, though,
are error reports from people witnessing this or similar phenomenon…

comment:6 Changed 6 years ago by Jonas Karlsson

Unless specified when compiling mod_php, it is compiled with internal SQLite support. Though this is only SQLite 2.x-something, which causes error when Trac tries to dynamically load SQLite 3.x libraries.

comment:7 Changed 6 years ago by Jonas Karlsson

Forgot to say: Therefore one has to compile mod_php with "—without-sqlite", and perhaps use php-sqlite3 (http://php-sqlite3.sourceforge.net) instead, if one has to have sqlite-support for mod_php.

comment:8 Changed 5 years ago by Jordi Funollet <jordi.f@…>

Just a workaround, but easier than compiling PHP: run Trac with FastCGI instead of mod_python.

View

Add a comment

Modify Ticket

Change Properties
<Author field>
Action
as closed
The resolution will be deleted. Next status will be 'reopened'
to The owner will be changed from cmlenz. Next status will be 'closed'
Author


E-mail address and user name can be saved in the Preferences.

 
Note: See TracTickets for help on using tickets.