Help with PHP, MySQL and Apache in Ubuntu 10.04

Alex Volkov avolkov-Re5JQEeQqe8AvxtiuMwx3w at public.gmane.org
Mon Sep 13 16:09:07 UTC 2010


Hello,

I tried your snippet, and

$sudo apt-get install php5-sqlite

Would make the line 

php> $test = new SQLiteDatabase("test55");

execute successfully. 

php5 is a big package and in debian it's been broken up into several
pieces and php5-sqlite is what you need.

Here's documentation on that package on php website 

http://www.php.net/manual/en/intro.sqlite.php

and it seems, the same way as in python, you don't need standalone
sqlite database package, because it's already been implemented in php.

Maybe you didin't restart apache after you install that library?

Alex.



On Sun, 2010-09-12 at 20:37 -0400, Paul King wrote:
> Done. Thanks. I would suppose that means I'm getting warm, but I am
> still being served a blank page, and the error in the log is the same as
> already mentioned below.
> 
> But I guess sqlite still needed to be installed, so thanks for asking
> about the obvious.
> 
> On Sun, 2010-09-12 at 19:54 -0400, Tyler Aviss wrote:
> > Maybe you need the php SQLite packages?
> > 
> > apt-get install php-mdb2-driver-sqlite php5-sqlite
> > 
> > On Sun, Sep 12, 2010 at 6:12 PM, Paul King <sciguy-Ja3L+HSX0kI at public.gmane.org> wrote:
> > > Hello
> > >
> > > I recently purchased (donationware) a web app (ThemeFrame) written in
> > > PHP that makes use of MySQL. It is supposed to run locally, on a local
> > > web server (localhost is OK, apparently).
> > >
> > > To make this work, it appeared that I needed to install PHP, mySQL, and
> > > Apache to some degree beyond their default packages.
> > >
> > > I wrote a little script that gave me phpinfo() and it tells me what I've
> > > installed, from PHP's point of view:
> > >
> > > I am running Debian on a 64-bit processor (SMP) with 2GB RAM
> > > Apache 2.2.14
> > > PHP 5.3.2
> > > I am viewing this on Firefox 3.6.9
> > >
> > > The problem is that, in the ThemeFrame installation instead of a kickass
> > > AJAX app, I get a blank screen. The online help at the BytesForAll
> > > website is a tad slow (it appears developers double as the tech
> > > support). I don't think it's the source code. I think the problem is in
> > > my configuration of apache/php/mysql, which was pretty much done "out of
> > > the box".
> > >
> > > Here is the only error reported by the apache error log:
> > >        [Sun Sep 12 17:40:43 2010] [error] [client ::1] PHP Fatal error:
> > >        Class 'SQLiteDatabase' not found
> > >        in /var/www/themeframe/functions.php on line 20
> > >
> > > By the code, it seems like it is attempting to make a database, then
> > > creating a table for data. If it fails, it dies. By my reckoning, it
> > > failed and it died, but not on that line. Here is the source code around
> > > that area:
> > >
> > >
> > >        // Check if DB "thfrdb" exists, else create it or display error
> > >        if ($db = new SQLiteDatabase(dirname(__FILE__) .
> > >        '/sqlite/thfrdb')) {
> > >                // if table "default" does not exist, create it
> > >                if (sqlite_table_exists($db, 'newdefault') === FALSE) {
> > >                        // Create table
> > >                        $db->queryExec('CREATE TABLE newdefault (id int,
> > >        option_name TEXT, option_value TEXT, PRIMARY KEY (id))');
> > >                }
> > >        } else {
> > >                die($err);
> > >        }
> > >
> > > It fails on the first line, just after the comment. Commenting out the
> > > "die" statement still results in the same error. So, it fails on object
> > > creation, as the error suggests. Also, the sqlite directory is
> > > world-writeable.
> > >
> > > Any suggestions?
> > >
> > > Paul King
> > >
> > > --
> > > The Toronto Linux Users Group.      Meetings: http://gtalug.org/
> > > TLUG requests: Linux topics, No HTML, wrap text below 80 columns
> > > How to UNSUBSCRIBE: http://gtalug.org/wiki/Mailing_lists
> > >
> > 
> > 
> > 
> 
> 
> --
> The Toronto Linux Users Group.      Meetings: http://gtalug.org/
> TLUG requests: Linux topics, No HTML, wrap text below 80 columns
> How to UNSUBSCRIBE: http://gtalug.org/wiki/Mailing_lists


--
The Toronto Linux Users Group.      Meetings: http://gtalug.org/
TLUG requests: Linux topics, No HTML, wrap text below 80 columns
How to UNSUBSCRIBE: http://gtalug.org/wiki/Mailing_lists





More information about the Legacy mailing list