SubversionException "SQLite is required to be compiled and run in thread-safe mode"

41 views
Skip to first unread message

yoni shalom

unread,
Apr 15, 2012, 5:00:14 PM4/15/12
to trac...@googlegroups.com
Hi, 
after a long while trying to debug this, it seems like php5 is making 
new subversion installs not able to talk to trac repository browser. 

see : http://www.snowbotic.com/archives/61 regarding dav_svn, which 
seems to have a similar problem. 

The problem looks like it relates to php5 and libsvn where php5's 
bundled sqlite library has a version that doesn't work with newer 
subversion repo's, and it gets loaded before the one python tries to 
load dynamically via its swig interface. 

I'm not sure this is actually the case, just that as a fact when I 
disable the php5 module in my apache, the problem goes away. 

Ideas ?

victoria

unread,
Apr 16, 2012, 4:29:45 AM4/16/12
to Trac Development


On Apr 15, 11:00 pm, yoni shalom <silve...@gmail.com> wrote:
> Hi,
> after a long while trying to debug this, it seems like php5 is making
> new subversion installs not able to talk to trac repository browser.
>
> see :http://www.snowbotic.com/archives/61regarding dav_svn, which
> seems to have a similar problem.
>
> The problem looks like it relates to php5 and libsvn where php5's
> bundled sqlite library has a version that doesn't work with newer
> subversion repo's, and it gets loaded before the one python tries to
> load dynamically via its swig interface.
>
> I'm not sure this is actually the case, just that as a fact when I
> disable the php5 module in my apache, the problem goes away.
>
> Ideas ?

In BitNami we found that in our BitNami Subversion Stack. The problem
is that Apache is loading the implementation of libsqlite included in
libphp5 which conflicts with subversion.

One (easiest) solution is to load the apache php module after the
mod_dav_svn and mod_authz_svn modules in apache (http://
answers.bitnami.org/questions/1951/sqlite-is-required-to-be-compiled-
and-run-in-thread-safe-mode).

The other solution is to compile apache yourself running the configure
script with the options --with-pdo_sqlite=/path/to/sqlite --with-
sqlite3=/path/to/sqlite

yoni shalom

unread,
Apr 17, 2012, 2:21:22 AM4/17/12
to trac...@googlegroups.com
I don't think I'm using mod_dav_svn or mod_authz_svn, and the error happens even if I move  libphp5  to the very end of the module list, 
because of the lazy (dynamically loaded) nature of python dependencies (I'm using WSGI)

So I don't see an option other than either compiling apache by myself, or turning off php.

victoria

unread,
Apr 18, 2012, 10:08:49 AM4/18/12
to Trac Development
On Apr 17, 8:21 am, yoni shalom <silve...@gmail.com> wrote:
> I don't think I'm using mod_dav_svn or mod_authz_svn, and the error happens
> even if I move  libphp5  to the very end of the module list,
> because of the lazy (dynamically loaded) nature of python dependencies (I'm
> using WSGI)
>
> So I don't see an option other than either compiling apache by myself, or
> turning off php.
>

Although in your case the problem is not with mod_dav_svn the same
solution should work for you, compiling PHP with an external sqlite
(threadsafe compiled) should work. If when you disable php works, then
it seems that the issue you are finding is very similar to the one we
found.

Other things you could try/investigate:
- If you are getting the error when you are trying to execute any
specific action (not when starting a apache) you may try to configure
which environment is loaded from your wsgi script (I'm not sure it
will work though)
- Another option that may work could be to compile subversion
statically
- Try BitNami Trac stack :) it uses it own environment (Apache with
mod_wsgi, python 2.6.5, subversion and Trac 0.12 and will not
interfere with your current environment)

> On Monday, April 16, 2012 11:29:45 AM UTC+3, victoria wrote:
>
> > On Apr 15, 11:00 pm, yoni shalom <silve...@gmail.com> wrote:
> > > Hi,
> > > after a long while trying to debug this, it seems like php5 is making
> > > new subversion installs not able to talk to trac repository browser.
>
> > > see :http://www.snowbotic.com/archives/61regardingdav_svn, which
> > > seems to have a similar problem.
>
> > > The problem looks like it relates to php5 and libsvn where php5's
> > > bundled sqlite library has a version that doesn't work with newer
> > > subversion repo's, and it gets loaded before the one python tries to
> > > load dynamically via its swig interface.
>
> > > I'm not sure this is actually the case, just that as a fact when I
> > > disable the php5 module in my apache, the problem goes away.
>
> > > Ideas ?
>
> > In BitNami we found that in our BitNami Subversion Stack. The problem
> > is that Apache is loading the implementation of libsqlite included in
> > libphp5 which conflicts with subversion.
>
> > One (easiest) solution is to load the apache php module after the
> > mod_dav_svn and mod_authz_svn modules in apache (http://
> > answers.bitnami.org/questions/1951/sqlite-is-required-to-be-compiled-
> > and-run-in-thread-safe-mode<http://answers.bitnami.org/questions/1951/sqlite-is-required-to-be-co...>).
>
> > The other solution is to compile apache yourself running the configure
> > script with the options --with-pdo_sqlite=/path/to/sqlite --with-
> > sqlite3=/path/to/sqlite
>
> On Monday, April 16, 2012 11:29:45 AM UTC+3, victoria wrote:
>
> > On Apr 15, 11:00 pm, yoni shalom <silve...@gmail.com> wrote:
> > > Hi,
> > > after a long while trying to debug this, it seems like php5 is making
> > > new subversion installs not able to talk to trac repository browser.
>
> > > see :http://www.snowbotic.com/archives/61regardingdav_svn, which
> > > seems to have a similar problem.
>
> > > The problem looks like it relates to php5 and libsvn where php5's
> > > bundled sqlite library has a version that doesn't work with newer
> > > subversion repo's, and it gets loaded before the one python tries to
> > > load dynamically via its swig interface.
>
> > > I'm not sure this is actually the case, just that as a fact when I
> > > disable the php5 module in my apache, the problem goes away.
>
> > > Ideas ?
>
> > In BitNami we found that in our BitNami Subversion Stack. The problem
> > is that Apache is loading the implementation of libsqlite included in
> > libphp5 which conflicts with subversion.
>
> > One (easiest) solution is to load the apache php module after the
> > mod_dav_svn and mod_authz_svn modules in apache (http://
> > answers.bitnami.org/questions/1951/sqlite-is-required-to-be-compiled-
> > and-run-in-thread-safe-mode<http://answers.bitnami.org/questions/1951/sqlite-is-required-to-be-co...>).
Reply all
Reply to author
Forward
0 new messages