Edgewall Software

Ticket #3112 (closed defect: invalid)

Opened 3 years ago

Last modified 16 months 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:

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

Changed 3 years ago by athomas

  • status changed from new to closed
  • resolution set to invalid

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.

Changed 3 years ago by anonymous

  • status changed from closed to reopened
  • resolution invalid deleted

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?

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

  • status changed from reopened to closed
  • resolution set to invalid

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

Changed 3 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 :) ).

Changed 3 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...

Changed 2 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.

Changed 2 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.

Changed 16 months ago by Jordi Funollet <jordi.f@…>

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

Add/Change #3112 (Trac's mod_python frontend doesn't work with php5)

Author



Change Properties
<Author field>
Action
as closed
Next status will be 'reopened'
to The owner will change from cmlenz. Next status will be 'closed'
 
Note: See TracTickets for help on using tickets.