1. Advertising
    y u no do it?

    Advertising (learn more)

    Advertise virtually anything here, with CPM banner ads, CPM email ads and CPC contextual links. You can target relevant areas of the site and show ads based on geographical location of the user if you wish.

    Starts at just $1 per CPM or $0.10 per CPC.

I Need Help With Using a SQlite Database.

Discussion in 'MySQL' started by NewshotDCB, Jun 30, 2007.

  1. #1
    I decided to make a forum for my new website, but most forums run on MySQL. I realized that I didn't get a MySQL database from my site provider, so I thought I was hopeless. Some nice people on this forum helped me out and made some recommendations. One guy wrote that PHP 5 came with SQlite and he gave me a link to a forum that runs on it.

    My hosting company uses PHP 5 in all packages, so I guess they provide SQlite. The problem is that I don't know how to access that database, install it, or create it. I barely understand PHP without using databases.

    Here is the forum that I want to use.
    http://punbb.org/

    Can anyone help me by explaining how to use a SQlite database or by providing a tutorial? I searched google, but I couldn't understand any of the tutorials that I saw.

    All help is appreciated!:D
     
    NewshotDCB, Jun 30, 2007 IP
  2. UnrealEd

    UnrealEd Peon

    Messages:
    148
    Likes Received:
    7
    Best Answers:
    0
    Trophy Points:
    0
    #2
    UnrealEd, Jun 30, 2007 IP
  3. NewshotDCB

    NewshotDCB Peon

    Messages:
    43
    Likes Received:
    0
    Best Answers:
    0
    Trophy Points:
    0
    #3
    The problem is that I don't know how to access my own database. I know that it supports it. I just don't know how to use SQLite.
     
    NewshotDCB, Jun 30, 2007 IP
  4. UnrealEd

    UnrealEd Peon

    Messages:
    148
    Likes Received:
    7
    Best Answers:
    0
    Trophy Points:
    0
    #4
    you don't need access to your database to install the forum. I'm not 100% sure, but i think you just have to fill in a username, password, host and database name to install the forum (you might have to select the database type as well, in your case SQLite).
    The forum probably has it's own database classes which can communicate with your SQLite database. You won't have to change anything to get it working.

    If you want to access your database, check your webhost and see if they don't provide an API (cPanel, Plesk or something else) through which you can access it. Usually these API's have an easy-to-use gui which allows you to create/remove/edit/... your databases
     
    UnrealEd, Jun 30, 2007 IP
  5. NewshotDCB

    NewshotDCB Peon

    Messages:
    43
    Likes Received:
    0
    Best Answers:
    0
    Trophy Points:
    0
    #5
    My Database panel just displays a text that reads, "You don't have any MySQL Databases." I don't really have access to any databases.

    I will try to install the forum without setting up a database, but I am almost positive that I will run into more trouble.
     
    NewshotDCB, Jun 30, 2007 IP
  6. UnrealEd

    UnrealEd Peon

    Messages:
    148
    Likes Received:
    7
    Best Answers:
    0
    Trophy Points:
    0
    #6
    hmmm, i'm pretty sure it's not gonna work if you didn't setup a database first. I did a quick search on the web and found an SQLite Manager. That way you can access your SQLite server and create a database:
    http://www.sqlitemanager.org/index.php?lang=en

    you will need the host and login information, but i'm sure you have it. There might a problem if the SQLite server only accepts connections via localhost (i've never worked with SQLite before, but this is an issue with other SQL servers)
     
    UnrealEd, Jul 1, 2007 IP
  7. PDoc

    PDoc Peon

    Messages:
    47
    Likes Received:
    40
    Best Answers:
    0
    Trophy Points:
    0
    #7
    I do not have any experience with punbb but I have worked with sqlite before.

    First: Sqlite is not a server-based meaning you do not provide a username/password to access it. Sqlite dbs are simply files on the filesystem.

    As for the errors "You don't have any MySQL Databases" it reads like punbb is trying to install with a mysql db.

    Look for an option during the installation where you can select a db type and select sqlite.

    Or there might be a settings/configuration file where you can choose the db type and select sqlite.
     
    PDoc, Jul 1, 2007 IP
  8. NewshotDCB

    NewshotDCB Peon

    Messages:
    43
    Likes Received:
    0
    Best Answers:
    0
    Trophy Points:
    0
    #8
    I tried to install it, but I received a message that said,

    "An error occured on line 57 in file /mnt/vhosta/www.mysite.com/forum/include/dblayer/sqlite.php.

    PunBB reported: Unable to create new database './forum'. Permission denied"

    I now posted this on the PunBB forums. Maybe they can help.
     
    NewshotDCB, Jul 1, 2007 IP