Page 2 of 2

Re: [SOLVED] Where is homepage stored? Editing fbuxCache.db

Posted: Fri May 11, 2012 7:28 pm
by Spoza
Tried that example, but get the following error:
Warning: SQLiteDatabase::queryExec() [sqlitedatabase.queryexec]: database is locked in /dtv/www/sqlite.php on line 14

Loading the page creates empty myDatabase.sqlite file immediately and then several seconds later this error appears.
No errors in the apache_error_log.

Same error appears even if I let the DB create in /mtd_rwarea instead of the default /dtv/www dir.

Re: [SOLVED] Where is homepage stored? Editing fbuxCache.db

Posted: Sat May 12, 2012 10:16 am
by juusso
You shouldn`t create database, try to connect existing fbuxCache.db (better make copy for tests...) by adapting path and db name.
Example file worked well, here is the output i got:
SpoilerShow

Code: Select all

Title: The Dark Knight
Director: Christopher Nolan
Year: 2008

Title: Cloverfield
Director: Matt Reeves
Year: 2008

Title: Beverly Hills Chihuahua
Director: Raja Gosnell
Year: 2008
database created: /dtv/www/myDatabase.sqlite

But trying to open fbuxCache.db i always get the error:
file is encrypted or is not a database
php file used:

Code: Select all

    <?php

    try
    {
      //create or open the database
  $database = new SQLiteDatabase('fbuxCache.db', 0666, $error);
    }
    catch(Exception $e)
    {
      die($error);
    }

   //read data from database
    $query = "SELECT * FROM BrowserState";
    if($result = $database->query($query, SQLITE_BOTH, $error))
    {
      while($row = $result->fetch())
      {
        print("HomeURL: {$row['HomeURL']} <br />");
      }
    }
    else
    {
      die($error);
    }
    ?>
Researching on the gave understanding the problem is due version mismatch and this database is to be open using PDO sqlite, which is missing on TV.
extension=pdo.so
extension=pdo_sqlite.so
extension=sqlite.so
extension=pdo_mysql.so

Re: [SOLVED] Where is homepage stored? Editing fbuxCache.db

Posted: Sat May 12, 2012 7:13 pm
by Spoza
juuso, my TV doesn't have a browser, so there is no fbuxCache.db file. That's why I tried the example.
But the example SHOULD work anyway, so I really wonder what can be the problem... I get only that 0-byte database file and no output in browser (apart from the error).

Re: [SOLVED] Where is homepage stored? Editing fbuxCache.db

Posted: Sun May 13, 2012 6:08 am
by juusso
As i said already, the example worked for me "as is".