Author Topic: Problem writing to sqlite db  (Read 7054 times)

Offline jstawski

  • Newbie
  • *
  • Posts: 4
Problem writing to sqlite db
« on: August 19, 2006, 04:17:52 AM »
I have installed roundcube on a windows 2003 server machine running php on iis. I'm using sqlite as the db and i can't seem to log in. When i look at the logs i get this:

[19-Aug-2006 02:07:14 -0600] DB Error: DB Error: unknown error Query: 8 ** INSERT INTO users (created, last_login, username, mail_host, alias, language) VALUES (now(), now(), 'jstawski@whatcanidomiami.info', 'whatcanidomiami.info', '', 'en_US') [nativecode=attempt to write a readonly database] in c:\websites\webmail\program\include\rcube_db.inc on line 479
[19-Aug-2006 02:07:14 -0600] PHP Error: Failed to create new user in c:\websites\webmail\program\include\main.inc on line 584
[19-Aug-2006 02:07:14 -0600] DB Error: DB Error: unknown error Query: 8 ** INSERT INTO session (sess_id, vars, ip, created, changed) VALUES ('5lsgbd8uc5710k6ndr0clf8ei6', 'user_lang|s:5:"en_US";auth_time|i:1155974834;task|s:4:"mail";user_id|s:0:"";', '216.189.168.166', now(), now()) [nativecode=attempt to write a readonly database] in c:\websites\webmail\program\include\rcube_db.inc on line 479


Here's the content of my db.in.php:


/*
 +-----------------------------------------------------------------------+
 | Configuration file for database access                |
 |                                    |
 | This file is part of the RoundCube Webmail client           |
 | Copyright (C) 2005, RoundCube Dev. - Switzerland           |
 | Licensed under the GNU GPL                      |
 |                                    |
 +-----------------------------------------------------------------------+

*/

$rcmail_config = array();

// PEAR database DSN for read/write operations
// format is db_provider://user:password@host/databse
// currentyl suported db_providers: mysql, sqlite

$rcmail_config['db_dsnw'] = 'sqlite://./sqlite.db?mode=0646';
// mysql example: $rcmail_config['db_dsnw'] = 'mysql://roundcube:pass@localhost/roundcubemail';
// postgres example: 'pgsql://roundcube:pass@localhost/roundcubemail';
// sqlite example: 'sqlite://./sqlite.db?mode=0646';

// PEAR database DSN for read only operations (if empty write database will be used)
// useful for database replication
$rcmail_config['db_dsnr'] = '';

// database backend to use (only db or mdb2 are supported)
$rcmail_config['db_backend'] = 'db';

// maximum length of a query in bytes
$rcmail_config['db_max_length'] = 512000; // 500K

// use persistent db-connections
$rcmail_config['db_persistent'] = TRUE;


// you can define specific table names used to store webmail data
$rcmail_config['db_table_users'] = 'users';

$rcmail_config['db_table_identities'] = 'identities';

$rcmail_config['db_table_contacts'] = 'contacts';

$rcmail_config['db_table_session'] = 'session';

$rcmail_config['db_table_cache'] = 'cache';

$rcmail_config['db_table_messages'] = 'messages';


// you can define specific sequence names used in PostgreSQL
$rcmail_config['db_sequence_users'] = 'user_ids';

$rcmail_config['db_sequence_identities'] = 'identity_ids';

$rcmail_config['db_sequence_contacts'] = 'contact_ids';

$rcmail_config['db_sequence_cache'] = 'cache_ids';

$rcmail_config['db_sequence_messages'] = 'message_ids';


// end db config file
?>

Thanks...

Offline jstawski

  • Newbie
  • *
  • Posts: 4
Re: Problem writing to sqlite db
« Reply #1 on: August 19, 2006, 04:43:46 PM »
Never mind, I was giving full access to the db, but i forgot to give sqlite.exe full access as well.

Offline jstawski

  • Newbie
  • *
  • Posts: 4
Re: Problem writing to sqlite db
« Reply #2 on: August 19, 2006, 04:57:41 PM »
Sorry, I had to give access to the root directory