phpSqliteAdmin Installation

Pythoneer

Wednesday, September 21. 2005

phpSqliteAdmin Installation

I wanted a simple web based "download and run"-SQLite browser. So my choice was of course a PHP tool, first thing to look for is something like phpMyAdmin just for SQLite.

There are two of them, with the same name "phpSQLiteAdmin":

  1. One by Yves Glodt
  2. Another one by Richard Heyes

and none of them works out of the box! So here is what I did to get number 2 (phpSQLiteAdmin by Richard Heyes) running.

I did it all on an Ubuntu machine, which is really a nice thing to have! But also for Windows user I try to point out what to do.

First of all, there is almost no documentation to it. Inside the documentation folder you find an INSTALL.txt but that doesn't tell you much more than a simple ls command says. Mainly it tells you that the configuration needs to be done in config/config.xml and that you have to adjust the file to your needs.

Prerequisites

  • Apache should be runnning
  • including a PHP4 (>=4.3)

Installation

  • I unpacked the file I downloaded into the DocumentRoot of my Apache of course. It created a dicrectory where all the files are in.
  • Since I expected a ready-to-go software, I simply opened the index.php in the browser - Blank page
  • Somewhere the error-reporting was surely turned off. So I did a grep -rn error_repo * inside the phpSQLiteAdmin directory. Line 23 in includes/prepend.php says error_reporting(0);. I commented that out to see what error occurs.

Fatal error: Call to undefined function: applyfunction() in /var/www/sqliteadmin/includes/common.php on line 225

  • Ok, that makes sense. I look at the code and found out that the function call should be common::applyFunction instead of applyFunction only. I corrected that by hand in the line given in the error message.
  • Next try to call the index.php in the browser.
Fatal error: Call to undefined function: sqlite_libversion() in /var/www/sqliteadmin/includes/configChecks.php on line 62
  • That looks like the sqlite lib is missing. Now there are multiple options, either modify the code and put a dl() in there, which loads the lib or add it to the php.ini and restart apache. I decided for the second option.
  • Since I am installing it on an ubuntu machine (debian kind of linux) I used the Synaptic package manager to install the module php4-sqlite, probably something like apt-get install php4-sqlite would work too, but I didn't try. As usual on ubuntu the installation went like charme and didn't bother me with strange messages that I don't understand ... after a while it only said "Done" - thank you! For Windows you might want to download the php_sqlite.dll or if you want to feel geeky try the PEAR/PECL Installer on the SQLite package from there.
  • Now I tried the index.php again, of course nothing else than a blank page.
  • I still need to tell PHP that the sqlite extension is there. To be sure that there is really none yet I opened a phpinfo.php page, which tells me after searching for "sqlite" that there is nothing alike.
  • So I search the php.ini, which is mostly somewhere in /etc or in C:\Windows I think. Again on my system I found it using find /etc -iname php.ini. Ubuntu installed the extension right into PHP's extension dir, which is defined inside the php.ini too. It has to be there in oder to add the extension in the php.ini.
  • Now I searched for the lines where other extensions have already been included inside the php.ini file. Those are mostly lines like extension=mysql.so, behind that line I simply added my extension=sqlite.so (.dll on Windows).
  • Now we only need to restart the Apache and after calling the index.php again it should nicely show a login page.

Configuration

Some people might like it easy, but this software gives you some stuff to figure out :-). What the hell do I have a login page for if I only want to look at a single (SQLite-) file? Well that's how it is, ok. Some people might need it, I wouldn't.

  • First thing we have to find out the login :-).
  • After searching the files a bit, I remembered the advise in the INSTALL.txt to check out the config/config.xml. (Btw. you don't need to look into the config.php file in the root of the application, it doesn't contain nothing you would expect!). Yes, there is an "Authentication" part in the config, which contains a username+password. The default seems to be username "admin" and the password is "password". Yep that works, so I logged in.
  • That looks good, finally I get to see what I wanted a phpMyAdmin-like screen. Great.
  • Still I need to configure where the tool can find my database file. Ok, jump back into the config.xml file, there is surely some database-part that I have to configure. Yes, "List of databases" it says. I modified the <path>./example.db</path> to point to my database file and change the name to fit my needs and tried it again in the browser.

Finally it's working. That was a little more than just download and run. But with a little bit PHP knowledge and some sense of adventure it's a nice task for some rainy afternoon. If you rather watch TVthat afternoon I hope this summary of my experiences helps a bit.

Good luck
Posted by Wolfram in Programming at 12:44
Comments (0)
Trackbacks (0)

Trackbacks
Trackback specific URI for this entry

No Trackbacks

Comments
Display comments as (Linear | Threaded)

No comments

Add Comment


To prevent automated Bots from commentspamming, please enter the string you see in the image below in the appropriate input box. Your comment will only be submitted if the strings match. Please ensure that your browser supports and accepts cookies, or your comment cannot be verified correctly.
CAPTCHA

 
 

Calendar

Back August '08
Mon Tue Wed Thu Fri Sat Sun
        1 2 3
4 5 6 7 8 9 10
11 12 13 14 15 16 17
18 19 20 21 22 23 24
25 26 27 28 29 30 31

Quicksearch

Categories

  • XML JavaScript
  • XML Mac stuff
  • XML Miscellaneous
  • XML Missing or not found
  • XML Music
  • XML Private
  • XML Programming


All categories

Archives

August 2008
July 2008
June 2008
Recent...
Older...

supersized.org

Owner login

supersized s9y blog hosting
Free s9y blog!

Disclaimer

Syndicate This Blog

XML RSS 0.91 feed
XML RSS 1.0 feed
XML RSS 2.0 feed
ATOM/XML ATOM 0.3 feed
ATOM/XML ATOM 1.0 feed
XML RSS 2.0 Comments

Top Referrers

www.google.com (8)
aenzioat.741.com (3)
bekaqkja.kogaryu.com (3)
machinegun.00freehost.com (3)
rettzemk.servetown.com (3)
www.google.ca (3)
www.google.co.uk (2)
www.google.com.pk (1)
www.google.de (1)
www.google.nl (1)

Top Exits

The owner of supersized.org is not responsible for any content on this page!