cdevroe / unmark

An open source to do app for bookmarks.
https://unmark.it
Other
1.6k stars 194 forks source link

Install error: #252

Closed yoyobbs closed 4 years ago

yoyobbs commented 5 years ago

I install it but show this error :( :( I open :127.0.0.1/setup

A DATABASE ERROR OCCURRED Error Number: 1293 Incorrect table definition; there can be only one TIMESTAMP column with CURRENT_TIMESTAMP in DEFAULT or ON UPDATE clause ALTER TABLE users_marks ADD datearchived timestamp DEFAULT CURRENT_TIMESTAMP ON UPDATE CURRENT_TIMESTAMP Filename: XXX/unmark/system/database/DB_driver.php Line Number: 691

Regards

cdevroe commented 4 years ago

@yoyobbs This issue should have been fixed in the latest releases. Please ensure you have the latest release. If you still get the issue please let me know.

NMNebel commented 4 years ago

I just tried to install unmark, but unfortunality I also get that error:

Error Number: 1293

Incorrect table definition; there can be only one TIMESTAMP column with CURRENT_TIMESTAMP in DEFAULT or ON UPDATE clause

ALTER TABLE `users_marks` ADD datearchived timestamp DEFAULT CURRENT_TIMESTAMP ON UPDATE CURRENT_TIMESTAMP

Filename: migrations/002_archive_stats.php

Line Number: 14

I use the latest release 1.9.2. Any help?

NMNebel commented 4 years ago

@cdevroe Can you give me a hint, how to fix that issue?

ve3lst commented 4 years ago

im try to install unmark 1.9.2 have MySQL Server version 8.0.19 php 7.4 apache web server ofc on windows 7 x64bit

i created new database called unmark as per recommendation, ensured the db type is utf8_general_ci to match the one in database.php after few mins from starting the installation it shows this error

A DATABASE ERROR OCCURRED
Error Number: 1064

You have an error in your SQL syntax; check the manual that corresponds to your MySQL server version for the right syntax to use near 'groups, status FROM `users_marks`' at line 1

SELECT id, urlid, tags, groups, status FROM `users_marks`

Filename: C:/Apache24/htdocs/unmark/system/database/DB_driver.php

Line Number: 691 
cdevroe commented 4 years ago

@ve3lst This issue doesn't seem to be related to what this GH issue is saying. It appears, perhaps, that you do not have the proper driver. Take a look at the config file for what driver you're using and report back.

ve3lst commented 4 years ago

ohh sorry. mb anyway it says mysqli in config

$db['default']['hostname'] = 'localhost';
$db['default']['username'] = 'root';
$db['default']['password'] = 'mypassword';
$db['default']['database'] = 'unmark';
$db['default']['dbdriver'] = 'mysqli';
// $db['default']['dbprefix'] = ''; # Do not use, see: https://github.com/plainmade/unmark/issues/62
$db['default']['pconnect'] = TRUE;
$db['default']['db_debug'] = TRUE;
$db['default']['cache_on'] = FALSE;
$db['default']['cachedir'] = '';
$db['default']['char_set'] = 'utf8';
$db['default']['dbcollat'] = 'utf8_general_ci';
$db['default']['swap_pre'] = '';
$db['default']['autoinit'] = TRUE;
$db['default']['stricton'] = FALSE;
$db['default']['timezone'] = '+00:00'; // GMT

btw in time zone i tried change it to my zone and tried keeping as is, same result

ve3lst commented 4 years ago

umm anything i can do to solve this? or i should open my own issue?

windware-ono commented 4 years ago

@ve3lst, it seems MySQL 8 has groups as a reserved keyword and all you have to do is quote it on line 295 of application/migrations/007_batshit_crazy.php (what's with the file name?) as of Version 2020.2.

   $marks = $this->db->query("SELECT id, urlid, tags, `groups`, status FROM `users_marks`");
cdevroe commented 4 years ago

Going to close this issue. As of 2020.3 we recommend using Docker to run Unmark. See readme.