Results 1 to 2 of 2

Thread: SQLite cannot find database problem

Hybrid View

Previous Post Previous Post   Next Post Next Post
  1. #1

    SQLite cannot find database problem

    I cannot get php and sqlite to work on my WL500g (Oleg's firmware 7b)

    website works, php works, dropbear and samba work
    SQLite commandline works, but I cannot connect to a database from php.

    I followed the tutorial on http://www.zend.com/php/beginners/php101-9.php
    I can create the library.db database, fill it with data and query it on the commandline, but when I try to run the php scripts that should connect, it dies with the 'could not open database message'

    This is what phpinfo reports on SQLite:

    SQLite support enabled
    PECL Module version 2.0-dev $Id: sqlite.c,v 1.146.2.3 2004/09/26 01:41:40 wez Exp $
    SQLite Library 2.8.14
    SQLite Encoding iso8859

    this is the code that give the problem:

    PHP Code:
    <?php
    // set path of database file
    $db "library.db";

    // open database file
    $handle sqlite_open($db) or die("Could not open database");
    ?>
    I checked all permissions on the file 'library.db', they have even been set at 777. I can get the file size with echo filesize($db) so it can be accessed.
    I copied the files to my development Debian box and it works flawlessly in that environment.


    Is there somebody who did get sqlite and php to work on a WL500g? Am I missing something?

  2. #2
    Hi i have same problem anybody knows?

Similar Threads

  1. sqlite problem
    By peterwrt in forum WL-HDD Q&A
    Replies: 0
    Last Post: 18-01-2006, 08:30
  2. Problem with USB Flashdisc
    By jirina42 in forum WL-500g Q&A
    Replies: 2
    Last Post: 18-12-2005, 18:27
  3. Problem with dieing AIR-connection
    By BòóN in forum WL-500g Q&A
    Replies: 7
    Last Post: 26-10-2004, 12:04

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •