Help with PHP, MySQL and Apache in Ubuntu 10.04

Paul King sciguy-Ja3L+HSX0kI at public.gmane.org
Sun Sep 12 22:12:49 UTC 2010


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





More information about the Legacy mailing list