-
Notifications
You must be signed in to change notification settings - Fork 193
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
Error during setup, then unable to register/login #163
Comments
noted error in console: |
@moltenkaizen Was this a fresh install or an upgrade? If an upgrade... did you run /upgrade ? |
@cdevroe A fresh install here. I've been hacking around trying to get it setup for a few days off and on. I'm sure I must be missing something. I'll drop the db and reclone from git to start fresh. My steps and the results:
Note error in console:
|
Thanks @moltenkaizen. Odd. I do not get that issue (or any at the moment). Hopefully we can get to the bottom of it. |
Btw, this is the line in question: https://github.com/plainmade/unmark/blob/master/application/migrations/002_archive_stats.php#L14 Oddly enough a default value is not being specified (which might be the problem?). |
BTW, the error you're getting AFTER running /setup is because migrations are not completing for you. Your database is woefully out-of-date. You could try running /upgrade but that likely will result in a similar error. I'm going to try a fresh install here yet again. And see if I can't see that same issue. |
Can you try a fresh install with https://github.com/plainmade/unmark/releases/tag/v1.7.1.1 - Thank you. I don't know if your issue is related but I've been unable to replicate it here so perhaps it is. |
hey @cdevroe , I tried the new build on the Ubuntu 14 server I'd been working with, but unfortunately the same error after hitting the install link on /setup
I wanted to rule out that server by trying another. I setup from scratch on Arch Linux with nginx 1.10.1-1/ mariadb 10.1.17-1 / php 7.0.11. Unmark installed and is running just fine. My ulimate goal was to have it installed on a production server running Ubuntu 14. Maybe I'll re-image the Ubuntu 14 VM I've been testing on and report the results. |
@moltenkaizen Can you give us the phpinfo() from both servers? Also, your application logs once development environment is turned on. If possible. Thanks so much. |
@moltenkaizen I don't want to close this issue until you've been able to get us the info. Obviously it is an environmental issue. But I wouldn't mind knowing what it is ... especially for posterity's sake. |
@cdevroe both arch and ubuntu 14 are working now. I can still post the configs if desired, but the latest release appears to be working. The solution was to installing a missing dependency. I don't remember exactly which one it was but I think it was a php module for mysql. Thanks for all your efforts |
I reproduced this on Ubuntu 16.04 I think. Fresh install. MySQL 5.7.15 Edit: Installed from latest release, not master. |
@neopostmodern I believe this bug is squashed in latest release. If you're still getting it you'll need to share your log files with us. |
@cdevroe Trying... In define('ENVIRONMENT', 'development'); Then hit A Database Error Occurred
Error Number: 1067
Invalid default value for 'datearchived'
ALTER TABLE `users_marks` ADD `datearchived` timestamp NOT NULL
Filename: /var/www/unmark/migrations/002_archive_stats.php
Line Number: 14 but |
I can reproduce this bug starting unmark in a Docker container with docker-compose using as db the standard image mysql, which is mysqld 5.7.16. |
@gameame Good catch. I wonder how we can go back in and make it backwards compatible (and forwards compat) for mySQL. I'd have to do some research there. cc @neopostmodern |
So, in the end I managed to solve this! For me at least, because the back- and forward compatibility will have to be figured out by someone who actually understands mySQL. I basically added one 14c14
< $this->dbforge->add_column('users_marks', array('datearchived' => array('type'=>'timestamp default current_timestamp')));
---
> $this->dbforge->add_column('users_marks', array('datearchived' => array('type'=>'timestamp')));
22c22
< }
---
> }
\ No newline at end of file
diff /var/www/unmark/application/migrations/003_users_update.php /home/neopostmodern/Downloads/unmark-master/application/migrations/003_users_update.php
18c18
< $this->db->query('ALTER TABLE `users` CHANGE COLUMN `datejoined` `date_joined` datetime NOT NULL');
---
> $this->db->query('ALTER TABLE `users` CHANGE COLUMN `datejoined` `date_joined` datetime NOT NULL DEFAULT \'0000-00-00 00:00:00\'');
40c40
< }
---
> }
\ No newline at end of file
diff /var/www/unmark/application/migrations/007_batshit_crazy.php /home/neopostmodern/Downloads/unmark-master/application/migrations/007_batshit_crazy.php
57c57
< `created_on` datetime NOT NULL,
---
> `created_on` datetime NOT NULL DEFAULT '0000-00-00 00:00:00',
179c179
< $this->db->query("ALTER TABLE `marks` CHANGE COLUMN `dateadded` `created_on` datetime NOT NULL COMMENT 'The datetime this record was created.'");
---
> $this->db->query("ALTER TABLE `marks` CHANGE COLUMN `dateadded` `created_on` datetime NOT NULL DEFAULT '0000-00-00 00:00:00' COMMENT 'The datetime this record was created.'");
260c260
< $this->db->query("ALTER TABLE `users` CHANGE COLUMN `date_joined` `created_on` datetime NOT NULL COMMENT 'The datetime the account was created'");
---
> $this->db->query("ALTER TABLE `users` CHANGE COLUMN `date_joined` `created_on` datetime NOT NULL DEFAULT '0000-00-00 00:00:00' COMMENT 'The datetime the account was created'");
353c353
< $this->db->query("ALTER TABLE `users_to_marks` CHANGE COLUMN `dateadded` `created_on` datetime NOT NULL COMMENT 'The datetime this record was created.'");
---
> $this->db->query("ALTER TABLE `users_to_marks` CHANGE COLUMN `dateadded` `created_on` datetime NOT NULL DEFAULT '0000-00-00 00:00:00' COMMENT 'The datetime this record was created.'");
596c596
< $this->db->query("ALTER TABLE `users` CHANGE COLUMN `created_on` `date_joined` datetime NOT NULL");
---
> $this->db->query("ALTER TABLE `users` CHANGE COLUMN `created_on` `date_joined` datetime NOT NULL DEFAULT '0000-00-00 00:00:00'");
602c602
< }
---
> }
\ No newline at end of file
diff /var/www/unmark/application/migrations/010_tokens.php /home/neopostmodern/Downloads/unmark-master/application/migrations/010_tokens.php
21c21
< `created_on` DATETIME NOT NULL COMMENT 'Creation date',
---
> `created_on` DATETIME NOT NULL DEFAULT '0000-00-00 00:00:00' COMMENT 'Creation date',
41c41
< }
---
> }
\ No newline at end of file This only fixes the setup. It's still not actually working (after login) but I'll file seperate bugs for that. Has anybody run this on mySQL 5.7 yet? |
I got the same error
|
@neopostmodern the first line of your diff is missing. To which file is it referred? If anyone is confident with docker, I set up a docker-compose configuration: https://github.com/gameame/docker-unmark |
@gameame Sorry, bad copy-paste. Just looked it up manually and it must be |
I've managed to work this out in 5.7.13 with |
I just got this error with a fresh install on OSX.
|
This issue still exists for some. So I'm working with some that is still having this issue and going through and adjusting the old migrations files. |
I will likely do a small point release to handle this. |
This is going to be addressed in 1.7.1.3. During this we've also identified other issues that some may run into using mySQL straight out of the box with macOS. I'll create a new issue for those things though. |
Sorry to reopen this, but I'm getting exactly this error on a fresh unmark install on Ubuntu server 16.04. I can report that following the exact same unmark install procedure, unmark fails with the above error on Ubuntu server 16.04, but succeeds on Debian 8.9. I did extensive tests on Ubuntu, testing both the latest release and a clone of the git repo (cleaning everything out in-between). For now I'm ok with simply moving unmark to a Debian host (my db is not very large) but I just wanted to confirm that the error reported by others above is well and alive on Ubuntu, and it is very likely related to something specific to Ubuntu. The Ubuntu 16.04 server runs PHP 7.0.22-0ubuntu0.16.04.1 and MySQL 5.7.19. In the hopes this might help someone else. |
I run unmark on IIS (windows server 2012 R2), PHP7 and MySQL 5.7 with Workbench 6.3 now, all you have to do is put the following command above: SET GLOBAL sql_mode = ''; SET GLOBAL sql_mode = ''; Finish it up... you will now have a database that you can install unmark to... |
Cloned 1.7.1 on subdomain. Setup produces this error:
A Database Error Occurred
Error Number: 1067
Invalid default value for 'datearchived'
ALTER TABLE
users_marks
ADDdatearchived
timestamp NOT NULLFilename: /var/www/unmark/migrations/002_archive_stats.php
Line Number: 14
If I ignore and refresh I'm redirected to the /register url. No matter what password I try, I'm unable to register. An empty red box appears under password field. Checked mysql db, I see tables in unmark. I could be doing something wrong during setup, thanks for the help.
| Tables_in_unmark |
+-------------------+
| groups |
| groups_invites |
| marks |
| migrations |
| users |
| users_groups |
| users_marks |
| users_smartlabels
The text was updated successfully, but these errors were encountered: