New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Database tables are not being created #23

Closed
bitraten opened this Issue Jul 16, 2012 · 17 comments

Comments

Projects
None yet
8 participants
@bitraten

bitraten commented Jul 16, 2012

I have owncloud version 4.04 installed and I want to use the newest version of the roundcube plugin from this repository.
After installing the plugin and setting it up in the general settings, I can't access the personal settings or the webmail app anymore.
Instead this error message is shown:

DB Error: "SQLSTATE[HY000]: General error: 1 no such table: oc_roundcube"
Offending command was: SELECT id FROM oc_roundcube WHERE ocUser = 'rphil'
@maucun

This comment has been minimized.

Show comment
Hide comment
@maucun

maucun Jul 18, 2012

It happens to me too! If it's necessary some kind of additional info, please, just let me know! Thanks!

maucun commented Jul 18, 2012

It happens to me too! If it's necessary some kind of additional info, please, just let me know! Thanks!

@dimw

This comment has been minimized.

Show comment
Hide comment
@dimw

dimw Jul 23, 2012

Contributor

Same problem here.

UPDATE:
To create the table manually use something like this:

/var/www/owncloud/data# sqlite3 owncloud.db
sqlite> create table oc_roundcube(id integer(5) PRIMARY KEY NOT NULL, ocUser text(4096) NOT NULL, mailUser text(4096) not null, mailPass true(4096) not null, UNIQUE(id));
sqlite> insert into oc_roundcube values(1, '%YOUR OC USER NAME%', '%YOUR EMAIL ADDRESS%', '%YOUR EMAIL PASSWORD%');
sqlite> .quit

Than it can be necessary to fix credentials at the personal settings page once more.

Contributor

dimw commented Jul 23, 2012

Same problem here.

UPDATE:
To create the table manually use something like this:

/var/www/owncloud/data# sqlite3 owncloud.db
sqlite> create table oc_roundcube(id integer(5) PRIMARY KEY NOT NULL, ocUser text(4096) NOT NULL, mailUser text(4096) not null, mailPass true(4096) not null, UNIQUE(id));
sqlite> insert into oc_roundcube values(1, '%YOUR OC USER NAME%', '%YOUR EMAIL ADDRESS%', '%YOUR EMAIL PASSWORD%');
sqlite> .quit

Than it can be necessary to fix credentials at the personal settings page once more.

@hypery2k

This comment has been minimized.

Show comment
Hide comment
@hypery2k

hypery2k Jul 23, 2012

Owner

I will investigate on this at the end of the week

Owner

hypery2k commented Jul 23, 2012

I will investigate on this at the end of the week

@kapcom01

This comment has been minimized.

Show comment
Hide comment
@kapcom01

kapcom01 Jul 31, 2012

@dimw /var/www/data# sqlite owncloud.db gives me:

Unable to open database "owncloud.db": file is encrypted or is not a database

kapcom01 commented Jul 31, 2012

@dimw /var/www/data# sqlite owncloud.db gives me:

Unable to open database "owncloud.db": file is encrypted or is not a database

@ghost ghost assigned hypery2k Aug 1, 2012

@hypery2k

This comment has been minimized.

Show comment
Hide comment
@hypery2k

hypery2k Aug 1, 2012

Owner

you all use sqllite?

Owner

hypery2k commented Aug 1, 2012

you all use sqllite?

@bitraten

This comment has been minimized.

Show comment
Hide comment
@bitraten

bitraten commented Aug 1, 2012

I do.

@dimw

This comment has been minimized.

Show comment
Hide comment
@dimw

dimw Aug 1, 2012

Contributor

@rphil assumed that /var/www/ is your OC installation directory and owncloud.db is not corrupt (because you can login, use the system and install plugins), the only issue can be the discrepancy between different sqlite versions. So you probably using sqlite 2.X.X and you need 3.X.X...

# sqlite3 -version
3.7.9 2011-11-01 00:52:41 c7c6050ef060877ebe77b41d959e9df13f8c9b5e
Contributor

dimw commented Aug 1, 2012

@rphil assumed that /var/www/ is your OC installation directory and owncloud.db is not corrupt (because you can login, use the system and install plugins), the only issue can be the discrepancy between different sqlite versions. So you probably using sqlite 2.X.X and you need 3.X.X...

# sqlite3 -version
3.7.9 2011-11-01 00:52:41 c7c6050ef060877ebe77b41d959e9df13f8c9b5e
@kapcom01

This comment has been minimized.

Show comment
Hide comment
@kapcom01

kapcom01 Aug 1, 2012

@dimw Thanks, sqlite version was the cause of my issue. The workouround of creating tables manually worked for me.

kapcom01 commented Aug 1, 2012

@dimw Thanks, sqlite version was the cause of my issue. The workouround of creating tables manually worked for me.

@dimw

This comment has been minimized.

Show comment
Hide comment
@dimw

dimw Aug 1, 2012

Contributor

@kapcom01 You're welcome )
@hypery2k I am using sqlite too. Unfortunately, it looks like even if the table was created manually, new OC users must be inserted by hand into oc_roundcube.

Contributor

dimw commented Aug 1, 2012

@kapcom01 You're welcome )
@hypery2k I am using sqlite too. Unfortunately, it looks like even if the table was created manually, new OC users must be inserted by hand into oc_roundcube.

@hypery2k

This comment has been minimized.

Show comment
Hide comment
@hypery2k

hypery2k Aug 2, 2012

Owner

did you upgrade an existing version of oc?

Owner

hypery2k commented Aug 2, 2012

did you upgrade an existing version of oc?

@kapcom01

This comment has been minimized.

Show comment
Hide comment
@kapcom01

kapcom01 Aug 2, 2012

yes. I did upgrade from an older version to 4.0.5

kapcom01 commented Aug 2, 2012

yes. I did upgrade from an older version to 4.0.5

@hypery2k hypery2k closed this Aug 5, 2012

@slipeer

This comment has been minimized.

Show comment
Hide comment
@slipeer

slipeer Aug 8, 2012

Maybe help.
Situation:
Clean instal.
OC 4.0.6
After enable RoundCube Application there some lines in apache2 error log:

[Wed Aug 08 14:08:18 2012] [error] [client 127.0.0.1] PHP Warning:  SQLite3::query(): Unable to prepare statement: 1, AUTOINCREMENT is only allowed on an INTEGER PRIMARY KEY in /var/www/lib/MDB2/Driver/sqlite3.php on line 495, referer: https://127.0.0.1/settings/apps.php?installed
[Wed Aug 08 14:08:18 2012] [error] [client 127.0.0.1] PHP Strict Standards:  Non-static method MDB2_Schema::errorMessage() should not be called statically, assuming $this from incompatible context in /var/www/3rdparty/MDB2/Schema.php on line 2794, referer: https://127.0.0.1/settings/apps.php?installed

And table oc_roundcube isn't created.

slipeer commented Aug 8, 2012

Maybe help.
Situation:
Clean instal.
OC 4.0.6
After enable RoundCube Application there some lines in apache2 error log:

[Wed Aug 08 14:08:18 2012] [error] [client 127.0.0.1] PHP Warning:  SQLite3::query(): Unable to prepare statement: 1, AUTOINCREMENT is only allowed on an INTEGER PRIMARY KEY in /var/www/lib/MDB2/Driver/sqlite3.php on line 495, referer: https://127.0.0.1/settings/apps.php?installed
[Wed Aug 08 14:08:18 2012] [error] [client 127.0.0.1] PHP Strict Standards:  Non-static method MDB2_Schema::errorMessage() should not be called statically, assuming $this from incompatible context in /var/www/3rdparty/MDB2/Schema.php on line 2794, referer: https://127.0.0.1/settings/apps.php?installed

And table oc_roundcube isn't created.

@hypery2k

This comment has been minimized.

Show comment
Hide comment
@hypery2k

hypery2k Aug 8, 2012

Owner

did you use SQLlite 3?

Owner

hypery2k commented Aug 8, 2012

did you use SQLlite 3?

@hypery2k hypery2k reopened this Aug 8, 2012

@hypery2k

This comment has been minimized.

Show comment
Hide comment
@hypery2k

hypery2k Sep 10, 2012

Owner

closing issue due to no feedback

Owner

hypery2k commented Sep 10, 2012

closing issue due to no feedback

@ismailyenigul

This comment has been minimized.

Show comment
Hide comment
@ismailyenigul

ismailyenigul Oct 15, 2012

I tested with rouncube app version 1.1.4. I have also the same problem on owncloud 4.5.0 . oc_rouncube table was not created.
The error message:
PHP Warning: SQLite3::query(): Unable to prepare statement: 1, AUTOINCREMENT is only allowed on an INTEGER PRIMARY KEY in /web/owncloud/lib/MDB2/Driver/sqlite3.php on line 495

I use sqlite3 version 3.6.20.

Thanks

ismailyenigul commented Oct 15, 2012

I tested with rouncube app version 1.1.4. I have also the same problem on owncloud 4.5.0 . oc_rouncube table was not created.
The error message:
PHP Warning: SQLite3::query(): Unable to prepare statement: 1, AUTOINCREMENT is only allowed on an INTEGER PRIMARY KEY in /web/owncloud/lib/MDB2/Driver/sqlite3.php on line 495

I use sqlite3 version 3.6.20.

Thanks

@glockmane glockmane referenced this issue Nov 16, 2012

Closed

app not loaded #65

@quemquis

This comment has been minimized.

Show comment
Hide comment
@quemquis

quemquis Nov 23, 2012

Using latest Roundcube (0.8.4) and OC (4.5.2) on Debian Squeeze.
Tried out the tips mentioned before here http://apps.owncloud.com/content/show.php?content=151523&forumpage=0 (deleted table and entries in owncloud.db, deleted roundcube folder in owncloud and downloaded latest from git - started over from scratch yet the tables are still not being created)

When I click on "Personal" in OC to enter my email and password as per step 4 in the wiki I get this error:

DB Error: "SQLSTATE[HY000]: General error: 1 no such table: oc_roundcube"
Offending command was: SELECT id FROM oc_roundcube WHERE oc_user = "myusername"

Obviously my owncloud.db (sqlite) is not being correctly updated. Is there a sqlite script I can run to create the correct tables manually? I looked through this App's folders but I cannot find any script to create the proper tables.

Thanks

quemquis commented Nov 23, 2012

Using latest Roundcube (0.8.4) and OC (4.5.2) on Debian Squeeze.
Tried out the tips mentioned before here http://apps.owncloud.com/content/show.php?content=151523&forumpage=0 (deleted table and entries in owncloud.db, deleted roundcube folder in owncloud and downloaded latest from git - started over from scratch yet the tables are still not being created)

When I click on "Personal" in OC to enter my email and password as per step 4 in the wiki I get this error:

DB Error: "SQLSTATE[HY000]: General error: 1 no such table: oc_roundcube"
Offending command was: SELECT id FROM oc_roundcube WHERE oc_user = "myusername"

Obviously my owncloud.db (sqlite) is not being correctly updated. Is there a sqlite script I can run to create the correct tables manually? I looked through this App's folders but I cannot find any script to create the proper tables.

Thanks

@quemquis

This comment has been minimized.

Show comment
Hide comment
@quemquis

quemquis Nov 23, 2012

Further to my comment above, I had to manually change the column values since they're not correct (ie. I had to manually create the oc_roundcube table with values oc_user mail_user and mail_password and not the ones mentioned above in dimw's post).
Hope this helps others having the same issue.
Obviously this manual hack is not ideal but it gets the job done.

quemquis commented Nov 23, 2012

Further to my comment above, I had to manually change the column values since they're not correct (ie. I had to manually create the oc_roundcube table with values oc_user mail_user and mail_password and not the ones mentioned above in dimw's post).
Hope this helps others having the same issue.
Obviously this manual hack is not ideal but it gets the job done.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment