Linux, Virtualization and whatever I find interesting ...

User Tools

Site Tools


Sqlite2 for BlogTNG on Ubuntu 12.04

I recently installed a DokuWiki on Ubuntu 12.04 Server Edition. But after adding BlogTNG I only get an Error 500

PHP Fatal error:  Call to undefined function sqlite_open() in /lib/plugins/blogtng/helper/sqlite.php on line 44

After some searching I find out that:

The plugin creates a blogtng.sqlite file which is currently a SQLite2 database and will not work with sqlite3 installed1)

but it seems Ubuntu 12.04 no longer has sqlite2.

ii  libaprutil1-dbd-sqlite3          1.3.12+dfsg-3              Apache Portable Runtime Utility Library - SQLite3 Driver
ii  libsqlite0                       2.8.17-7fakesync1build1    SQLite shared library
ii  libsqlite3-0                     3.7.9-2ubuntu1.1           SQLite 3 shared library
ii  php5-sqlite                      5.3.10-1ubuntu3.5          SQLite module for php5
ii  sqlite3                          3.7.9-2ubuntu1.1           Command line interface for SQLite 3

These are the package versions. No v2!

Get sqlite2

Here I found a solution. A little bit dirty but working. The documentation mostly worked for me only the path for the .so file I had to ajust. Here my documentation perhaps if someone else have the Problem the solution will be found faster.

We are manipulating libraries I think you know: This changes have to be done as root user (or with sudo). And pleas be careful don't damage your installation

You have to get an older sqlite package from a prior Ubuntu.

wget http://security.ubuntu.com/ubuntu/pool/main/p/php5/php5-sqlite_5.3.5-1ubuntu7.11_amd64.deb


wget http://security.ubuntu.com/ubuntu/pool/main/p/php5/php5-sqlite_5.3.5-1ubuntu7.11_i386.deb

After this extract it

cd /tmp
mkdir sqlite
dpkg -x php5-sqlite_5.3.5-1ubuntu7.11_i386.deb sqlite

And copy the library to the others

cp -iv sqlite/usr/lib/php5/20090626+lfs/sqlite.so /usr/lib/php5/20090626+lfs

Now you have to create an ini file witch activates the new module

; configuration for php SQLite module

And finaly restart your apache

service apache2 restart

Now BlogTNG should work.

This website uses cookies. By using the website, you agree with storing cookies on your computer. Also you acknowledge that you have read and understand our Privacy Policy. If you do not agree leave the website.More information about cookies
linux/sqlite_ubuntu12_04.txt · Last modified: 06.06.2013 15:25 by eanderalx