Closed uidHUB closed 6 years ago
I can't reproduce this, with a slightly older MariaDB version. Can anybody else reproduce it?
@KitsuneSolar Could you please post the output of composer show
?
@franzliedke in preparation of beta 7 I installed on the same Mariadb version, but didn't see this pop up. I'll take another look.
Tested on
php 7.1.6
mysql Ver 15.1 Distrib 10.2.7-MariaDB, for osx10.12 (x86_64) using readline 5.1
php 7.1.7
Lol good thing I decided to also upgrade PHP as a test. So most likely this is caused by the PHP 7.1 pdo mysql library.
That's bizarre
Also what strikes me as an obvious problem is the fact that the default value NULL
is injected into the statement as 'NULL'
I am not completely sure this is an issue though.
Oh I didn't even notice that! That would be the issue indeed. Can you confirm it is purely a PHP problem (does it work with php 7.1.7 + MySQL?)
I thought that is the issue. And had hoped it's due to a bug in the specific version of doctrine/dbal etc.
Brew is now installing mysql server. I'll let you know in a sec.
PHP 7.1.7 + MySQL 5.7.19 mysql Ver 14.14 Distrib 5.7.19, for osx10.12 (x86_64) using EditLine wrapper
works
Also, error reproducible: https://discuss.flarum.org/d/6342-mysql-error-on-install
@KitsuneSolar Again, please post the output of composer show
@franzliedke sorry.
components/font-awesome 4.7.0 The iconic font designed for use with Twitter Bootstrap.
danielstjules/stringy 1.10.0 A string manipulation library with multibyte support
dflydev/fig-cookies v1.0.2 Cookies for PSR-7 HTTP Message Interface.
doctrine/annotations v1.5.0 Docblock Annotations Parser
doctrine/cache v1.7.0 Caching library offering an object-oriented API for many cache backends
doctrine/collections v1.5.0 Collections Abstraction library
doctrine/common v2.8.0 Common Library for Doctrine projects
doctrine/dbal v2.6.0 Database Abstraction Layer
doctrine/inflector v1.2.0 Common String Manipulations with regard to casing and singular/plural rules.
doctrine/lexer v1.0.1 Base library for a lexer that can be used in Top-Down, Recursive Descent Parsers.
filp/whoops 2.1.9 php error handling for cool kids
flarum/core v0.1.0-beta.7 Delightfully simple forum software.
flarum/flarum-ext-akismet v0.1.0-beta.6 Stop spam using the Akismet anti-spam service.
flarum/flarum-ext-approval v0.1.0-beta.7 Make discussions and posts require moderator approval.
flarum/flarum-ext-auth-facebook v0.1.0-beta.6 Allow users to log in with Facebook.
flarum/flarum-ext-auth-github v0.1.0-beta.6 Allow users to log in with GitHub.
flarum/flarum-ext-auth-twitter v0.1.0-beta.6 Allow users to log in with Twitter.
flarum/flarum-ext-bbcode v0.1.0-beta.5 Allow posts to be formatted with BBCode.
flarum/flarum-ext-emoji v0.1.0-beta.6 Convert text and unicode emoji into Twemoji.
flarum/flarum-ext-english v0.1.0-beta.7 English language pack.
flarum/flarum-ext-flags v0.1.0-beta.7 Allow users to flag posts for moderator review.
flarum/flarum-ext-likes v0.1.0-beta.6 Allow users to like posts.
flarum/flarum-ext-lock v0.1.0-beta.7 End a discussion and don't let anyone add further replies.
flarum/flarum-ext-markdown v0.1.0-beta.5 Allow posts to be formatted with Markdown.
flarum/flarum-ext-mentions v0.1.0-beta.7 Mention and reply to specific posts and users.
flarum/flarum-ext-pusher v0.1.0-beta.6 See new discussions and posts in real-time using Pusher.
flarum/flarum-ext-sticky v0.1.0-beta.7 Pin discussions to the top of the list.
flarum/flarum-ext-subscriptions v0.1.0-beta.6 Allow users to follow discussions and receive notifications for new posts.
flarum/flarum-ext-suspend v0.1.0-beta.7 Suspend users so they can't post.
flarum/flarum-ext-tags v0.1.0-beta.8 Organize discussions into a hierarchy of tags and categories.
franzl/studio 0.11.2 Develop your Composer libraries with style
franzl/whoops-middleware 0.4.1
guzzlehttp/guzzle 6.3.0 Guzzle is a PHP HTTP client library
guzzlehttp/promises v1.3.1 Guzzle promises library
guzzlehttp/psr7 1.4.2 PSR-7 message implementation that also provides common utility methods
http-interop/http-middleware 0.2.0 Common interface for HTTP middleware
illuminate/bus v5.1.41 The Illuminate Bus package.
illuminate/cache v5.1.41 The Illuminate Cache package.
illuminate/config v5.1.41 The Illuminate Config package.
illuminate/container v5.1.41 The Illuminate Container package.
illuminate/contracts v5.1.41 The Illuminate Contracts package.
illuminate/database v5.1.41 The Illuminate Database package.
illuminate/events v5.1.41 The Illuminate Events package.
illuminate/filesystem v5.1.41 The Illuminate Filesystem package.
illuminate/hashing v5.1.41 The Illuminate Hashing package.
illuminate/mail v5.1.41 The Illuminate Mail package.
illuminate/pipeline v5.1.41 The Illuminate Pipeline package.
illuminate/support v5.1.41 The Illuminate Support package.
illuminate/validation v5.1.41 The Illuminate Validation package.
illuminate/view v5.1.41 The Illuminate View package.
intervention/image 2.4.0 Image handling and manipulation library with support for Laravel integration
ircmaxell/random-lib v1.2.0 A Library For Generating Secure Random Numbers
ircmaxell/security-lib v1.1.0 A Base Security Library
league/flysystem 1.0.40 Filesystem abstraction: Many filesystems, one API.
league/oauth1-client 1.7.0 OAuth 1.0 Client Library
league/oauth2-client 1.4.2 OAuth 2.0 Client Library
league/oauth2-facebook 1.4.5 Facebook OAuth 2.0 Client Provider for The PHP League OAuth2-Client
league/oauth2-github 0.2.2 Github OAuth 2.0 Client Provider for The PHP League OAuth2-Client
matthiasmullie/minify 1.3.46 CSS & JS minifier
matthiasmullie/path-converter 1.1.0 Relative path converter
monolog/monolog 1.23.0 Sends your logs to files, sockets, inboxes, databases and various web services
nesbot/carbon 1.22.1 A simple API extension for DateTime.
nikic/fast-route v0.6.0 Fast request router for PHP
oyejorge/less.php v1.7.0.14 PHP port of the Javascript version of LESS http://lesscss.org (Originally maintained by Josh Schmidt)
paragonie/random_compat v1.4.2 PHP 5.x polyfill for random_bytes() and random_int() from PHP 7
psr/http-message 1.0.1 Common interface for HTTP messages
psr/log 1.0.2 Common interface for logging libraries
pusher/pusher-php-server 2.6.4 Library for interacting with the Pusher REST API
s9e/text-formatter 0.8.5 Multi-purpose text formatting and markup library. Plugins offer support for BBCodes, Markdown, emoticons, HTML, embedding media (YouTube, e...
swiftmailer/swiftmailer v5.4.8 Swiftmailer, free feature-rich PHP mailer
symfony/console v2.8.25 Symfony Console Component
symfony/debug v2.7.32 Symfony Debug Component
symfony/filesystem v3.3.5 Symfony Filesystem Component
symfony/finder v2.7.32 Symfony Finder Component
symfony/http-foundation v2.7.32 Symfony HttpFoundation Component
symfony/polyfill-mbstring v1.4.0 Symfony polyfill for the Mbstring extension
symfony/process v3.3.5 Symfony Process Component
symfony/translation v2.7.32 Symfony Translation Component
symfony/yaml v2.8.25 Symfony Yaml Component
tijsverkoyen/akismet 1.1.1 Akismet is a wrapper-class to communicate with the Akismet API.
tobscure/json-api v0.3.0 JSON-API responses in PHP
zendframework/zend-diactoros 1.4.0 PSR HTTP Message implementations
zendframework/zend-escaper 2.5.2
zendframework/zend-stratigility 1.3.3 Middleware for PHP
Can you do composer require doctrine/dbal v2.5.13
and see whether that works, please?
Sorry, I do not know much about Composer. :(
composer require doctrine/dbal v2.5.13
./composer.json has been updated
Loading composer repositories with package information
Updating dependencies (including require-dev)
Your requirements could not be resolved to an installable set of packages.
Problem 1
- Installation request for doctrine/dbal v2.5.13 -> satisfiable by doctrine/dbal[v2.5.13].
- Conclusion: remove doctrine/common v2.8.0
- Conclusion: don't install doctrine/common v2.8.0
- doctrine/dbal v2.5.13 requires doctrine/common >=2.4,<2.8-dev -> satisfiable by doctrine/common[2.4.0-RC1, 2.4.0-RC2, 2.4.0-RC3, 2.4.0-RC4, v2.4.0, v2.4.1, v2.4.2, v2.4.3, v2.5.0, v2.5.0-beta1, v2.5.1, v2.5.2, v2.5.3, v2.6.0, v2.6.1, v2.6.2, v2.7.0, v2.7.1, v2.7.2, v2.7.3].
- Can only install one of: doctrine/common[v2.7.1, v2.8.0].
- Can only install one of: doctrine/common[v2.7.2, v2.8.0].
- Can only install one of: doctrine/common[v2.7.3, v2.8.0].
- Can only install one of: doctrine/common[2.4.0-RC1, v2.8.0].
- Can only install one of: doctrine/common[2.4.0-RC2, v2.8.0].
- Can only install one of: doctrine/common[2.4.0-RC3, v2.8.0].
- Can only install one of: doctrine/common[2.4.0-RC4, v2.8.0].
- Can only install one of: doctrine/common[v2.4.0, v2.8.0].
- Can only install one of: doctrine/common[v2.4.1, v2.8.0].
- Can only install one of: doctrine/common[v2.4.2, v2.8.0].
- Can only install one of: doctrine/common[v2.4.3, v2.8.0].
- Can only install one of: doctrine/common[v2.5.0, v2.8.0].
- Can only install one of: doctrine/common[v2.5.0-beta1, v2.8.0].
- Can only install one of: doctrine/common[v2.5.1, v2.8.0].
- Can only install one of: doctrine/common[v2.5.2, v2.8.0].
- Can only install one of: doctrine/common[v2.5.3, v2.8.0].
- Can only install one of: doctrine/common[v2.6.0, v2.8.0].
- Can only install one of: doctrine/common[v2.6.1, v2.8.0].
- Can only install one of: doctrine/common[v2.6.2, v2.8.0].
- Can only install one of: doctrine/common[v2.7.0, v2.8.0].
- Installation request for doctrine/common (locked at v2.8.0) -> satisfiable by doctrine/common[v2.8.0].
Installation failed, reverting ./composer.json to its original content.
Hmm, I tried it with v2.6.0 and it worked just fine for me. So it probably is related to MariaDB.
I have same problem.
small workaround, use with caution!
open vendor/doctrine/dbal/lib/Doctrine/DBAL/Platforms/AbstractPlatform.php
and replace following lines (line 2253 and 2255):
$default = empty($field['notnull']) ? ' DEFAULT NULL' : '';
if (isset($field['default'])) {
with:
$default = empty($field['notnull']) || $field['default'] === 'NULL' ? ' DEFAULT NULL' : '';
if (isset($field['default']) && $field['default'] !== 'NULL') {
@sijad working!
'NULL'
is not NULL
. One is a string, the other one is the absence of a value in SQL terms.
This is not an issue with DBAL - we only support strings as default values.
Do not use the workaround - correct the mapping instead.
@Ocramius Thanks for getting back to us here, but I don't understand what you are suggesting. There are two places where we reference this column, in column creation and renaming:
Also, the error happens only with certain versions of MariaDB / dbal, so I am unsure what we should be doing wrong there...
Updated PHP. But error continues....
components/font-awesome 4.7.0 The iconic font designed for use with Twitter Bootstrap.
danielstjules/stringy 1.10.0 A string manipulation library with multibyte support
dflydev/fig-cookies v1.0.2 Cookies for PSR-7 HTTP Message Interface.
doctrine/annotations v1.5.0 Docblock Annotations Parser
doctrine/cache v1.7.0 Caching library offering an object-oriented API for many cache backends
doctrine/collections v1.5.0 Collections Abstraction library
doctrine/common v2.8.0 Common Library for Doctrine projects
doctrine/dbal v2.6.1 Database Abstraction Layer
doctrine/inflector v1.2.0 Common String Manipulations with regard to casing and singular/plural rules.
doctrine/lexer v1.0.1 Base library for a lexer that can be used in Top-Down, Recursive Descent Parsers.
filp/whoops 2.1.10 php error handling for cool kids
flarum/core v0.1.0-beta.7 Delightfully simple forum software.
flarum/flarum-ext-akismet v0.1.0-beta.6 Stop spam using the Akismet anti-spam service.
flarum/flarum-ext-approval v0.1.0-beta.7 Make discussions and posts require moderator approval.
flarum/flarum-ext-auth-facebook v0.1.0-beta.6 Allow users to log in with Facebook.
flarum/flarum-ext-auth-github v0.1.0-beta.6 Allow users to log in with GitHub.
flarum/flarum-ext-auth-twitter v0.1.0-beta.6 Allow users to log in with Twitter.
flarum/flarum-ext-bbcode v0.1.0-beta.5 Allow posts to be formatted with BBCode.
flarum/flarum-ext-emoji v0.1.0-beta.6 Convert text and unicode emoji into Twemoji.
flarum/flarum-ext-english v0.1.0-beta.7 English language pack.
flarum/flarum-ext-flags v0.1.0-beta.7 Allow users to flag posts for moderator review.
flarum/flarum-ext-likes v0.1.0-beta.6 Allow users to like posts.
flarum/flarum-ext-lock v0.1.0-beta.7 End a discussion and don't let anyone add further replies.
flarum/flarum-ext-markdown v0.1.0-beta.5 Allow posts to be formatted with Markdown.
flarum/flarum-ext-mentions v0.1.0-beta.7 Mention and reply to specific posts and users.
flarum/flarum-ext-pusher v0.1.0-beta.6 See new discussions and posts in real-time using Pusher.
flarum/flarum-ext-sticky v0.1.0-beta.7 Pin discussions to the top of the list.
flarum/flarum-ext-subscriptions v0.1.0-beta.6 Allow users to follow discussions and receive notifications for new posts.
flarum/flarum-ext-suspend v0.1.0-beta.7 Suspend users so they can't post.
flarum/flarum-ext-tags v0.1.0-beta.8 Organize discussions into a hierarchy of tags and categories.
franzl/studio 0.11.2 Develop your Composer libraries with style
franzl/whoops-middleware 0.4.1
guzzlehttp/guzzle 6.3.0 Guzzle is a PHP HTTP client library
guzzlehttp/promises v1.3.1 Guzzle promises library
guzzlehttp/psr7 1.4.2 PSR-7 message implementation that also provides common utility methods
http-interop/http-middleware 0.2.0 Common interface for HTTP middleware
illuminate/bus v5.1.41 The Illuminate Bus package.
illuminate/cache v5.1.41 The Illuminate Cache package.
illuminate/config v5.1.41 The Illuminate Config package.
illuminate/container v5.1.41 The Illuminate Container package.
illuminate/contracts v5.1.41 The Illuminate Contracts package.
illuminate/database v5.1.41 The Illuminate Database package.
illuminate/events v5.1.41 The Illuminate Events package.
illuminate/filesystem v5.1.41 The Illuminate Filesystem package.
illuminate/hashing v5.1.41 The Illuminate Hashing package.
illuminate/mail v5.1.41 The Illuminate Mail package.
illuminate/pipeline v5.1.41 The Illuminate Pipeline package.
illuminate/support v5.1.41 The Illuminate Support package.
illuminate/validation v5.1.41 The Illuminate Validation package.
illuminate/view v5.1.41 The Illuminate View package.
intervention/image 2.4.0 Image handling and manipulation library with support for Laravel integration
ircmaxell/random-lib v1.2.0 A Library For Generating Secure Random Numbers
ircmaxell/security-lib v1.1.0 A Base Security Library
league/flysystem 1.0.41 Filesystem abstraction: Many filesystems, one API.
league/oauth1-client 1.7.0 OAuth 1.0 Client Library
league/oauth2-client 1.4.2 OAuth 2.0 Client Library
league/oauth2-facebook 1.4.5 Facebook OAuth 2.0 Client Provider for The PHP League OAuth2-Client
league/oauth2-github 0.2.2 Github OAuth 2.0 Client Provider for The PHP League OAuth2-Client
matthiasmullie/minify 1.3.46 CSS & JS minifier
matthiasmullie/path-converter 1.1.0 Relative path converter
monolog/monolog 1.23.0 Sends your logs to files, sockets, inboxes, databases and various web services
nesbot/carbon 1.22.1 A simple API extension for DateTime.
nikic/fast-route v0.6.0 Fast request router for PHP
oyejorge/less.php v1.7.0.14 PHP port of the Javascript version of LESS http://lesscss.org (Originally maintained by Josh Schmidt)
paragonie/random_compat v1.4.2 PHP 5.x polyfill for random_bytes() and random_int() from PHP 7
psr/http-message 1.0.1 Common interface for HTTP messages
psr/log 1.0.2 Common interface for logging libraries
pusher/pusher-php-server 2.6.4 Library for interacting with the Pusher REST API
s9e/text-formatter 0.8.5 Multi-purpose text formatting and markup library. Plugins offer support for BBCodes, Markdown, emoticons, HTML, embedding media (YouTube, e...
swiftmailer/swiftmailer v5.4.8 Swiftmailer, free feature-rich PHP mailer
symfony/console v2.8.26 Symfony Console Component
symfony/debug v2.7.33 Symfony Debug Component
symfony/filesystem v3.3.6 Symfony Filesystem Component
symfony/finder v2.7.33 Symfony Finder Component
symfony/http-foundation v2.7.33 Symfony HttpFoundation Component
symfony/polyfill-mbstring v1.4.0 Symfony polyfill for the Mbstring extension
symfony/process v3.3.6 Symfony Process Component
symfony/translation v2.7.33 Symfony Translation Component
symfony/yaml v2.8.26 Symfony Yaml Component
tijsverkoyen/akismet 1.1.1 Akismet is a wrapper-class to communicate with the Akismet API.
tobscure/json-api v0.3.0 JSON-API responses in PHP
zendframework/zend-diactoros 1.4.0 PSR HTTP Message implementations
zendframework/zend-escaper 2.5.2
zendframework/zend-stratigility 1.3.3 Middleware for PHP
@KitsuneSolar Could you maybe try PHP 7.2 (beta), to see if the problem persists? If it does, then it may be a PHP bug. If not, then you can wait for PHP 7.2 to be released.
@datitisev @KitsuneSolar as my research pointed out this is an issue specific to MariaDB 10.2.7+
@luceos I'm not sure what the problem is in mysql
mysql -V
mysql Ver 15.1 Distrib 10.2.8-MariaDB, for Linux (x86_64) using readline 5.1
Problem still exists. And most likely will continue. Error somewhere in the code.
Can it be because of mysql strict mode? https://dev.mysql.com/doc/refman/5.7/en/sql-mode.html#sql-mode-strict
This is caused by new Column Schema enforced by MariaDB starting from version 10.2 and they are planing to enforce it as a standard in all upcoming versions, see https://jira.mariadb.org/browse/MDEV-13341
possible fix is in https://github.com/doctrine/dbal/pull/2825
Having this problem too and it's quite annoying.
@tenten8401 starting to share you opinion. :grin:
My development has stalled due to this issue. Recently I had to reinstall Mariadb and couldn't easily add a new Flarum installation 😞
From what I've read we just have to wait for the PR @auviagroup mentioned to be merged and update asap.
Also confirm fresh install generates this error following composer create-project flarum/flarum . --stability=beta , then opening the website for install. Install produces:
Something went wrong: SQLSTATE[42000]: Syntax error or access violation: 1067 Invalid default value for 'notifications_read_time' (SQL: ALTER TABLE users CHANGE notification_read_time notifications_read_time DATETIME DEFAULT 'NULL')
So, is this actually going to be fixed...?
The Doctrine MR that fixes this has been merged, but the 2.7 branch has not seen a release yet. I am afraid we need to be patient. :cry:
I looked at this again. Taylor isn't support MariaDB officially. I think we have an issue now. See:
What I tried:
I am unsure where this discussion left off. I a new here, and I am more of a Linux Admin than programmer. I was working on a fresh install of Flarum using a separate 10.2.x MariaDB server cluster; php 7.1.x from remi ; Centos 7.x ; Composer 1.6.4.
The error message:
Something went wrong: SQLSTATE[42000]: Syntax error or access violation: 1067 Invalid default value for 'notifications_read_time' (SQL: ALTER TABLE flusers CHANGE notification_read_time notifications_read_time DATETIME DEFAULT 'NULL')
I am sort of in the same boat as you are and from the discussion above, it looks like a fix for this is being worked on here https://github.com/doctrine/dbal/pull/2825 and this PR is part of 2.7 Milestone which is yet to be released.
In short, release of 2.7 is what is required. Hope this helps!
Indeed, we're waiting for the new DBAL release to be finished, until then there's not much we can do, I'm afraid.
I've tried patching our migrations to make them work without 2.7. But that effort was pretty useless. I ended up moving back to MySQL for development 😊
Perhaps Flarum is more of a dev box project... For newer production environments, I know of no one using MySQL any more. Our Drupal 7, Drupal 8, and WordPress stacks are faster and more reliable on MariaDB, or Postgre.
We do have MySQL on our old servers, but they are all on their way to retirement.
I was hoping to use Flarum on a current WordPress site.
The environment is:
10.2.x MariaDB
7.1.x remi on CentOS 7.x
Do you know if any work is being done to correct the problem?
If so, I'd like to edit the Database instructions to include the details it lacks, including exactly what does and does not work, Character Set, and so on.
Stephen Grettenberg
Web Applications Specialist
Information Technology
University of Massachusetts, Amherst
stephen.grettenberg@umass.eduhttp://stephen.grettenberg@umass.edu
Life shrinks or expands in proportion to one's courage
We cannot solve our problems with the same thinking we used when we created them.
What is a weed? A plant whose virtues have never been discovered.
From: Daniël Klabbers notifications@github.com Sent: Monday, February 12, 2018 3:51:10 AM To: flarum/core Cc: Stephen Grettenberg; Comment Subject: Re: [flarum/core] MariaDB 10.2.7+ nullable date/time (Invalid default value for 'notifications_read_time') (#1211)
I've tried patching our migrations to make them work without 2.7. But that effort was pretty useless. I ended up moving back to MySQL for development 😊
— You are receiving this because you commented. Reply to this email directly, view it on GitHubhttps://github.com/flarum/core/issues/1211#issuecomment-364860618, or mute the threadhttps://github.com/notifications/unsubscribe-auth/Ae_dwFd9oRJIdcp6N3IJ-A10FekHRq1qks5tT_t-gaJpZM4OjKWS.
@grettenberg I recently started using Flarum with MariaDB 10.1 with no issues at all. Although 10.2.x support is still isn't there and my production environment uses that version but considering the fact that everything (as of now) works smoothly with 10.1, I'd like to believe things will stay the way they are!
However, the documentation still needs to specify support for MariaDB to make things clear!
Again, we're waiting for the upstream release; until then, we should not advertise compatiblity with MariaDB.
This is understood. However, the documentation should reflect that. The documentation for MySQL should reflect pertinent information like Character Set and/or Collate information, or that it should not be used, amongst other settings.
Usually, MariaDB is transparent as a sub for the older slower MySQL - so posting a warning makes sense as well.
Finally, maybe a timeline. MariaDB is used extensively in production environments. It is a deal breaker - I can toss a few programmers at a problem easily enough. I can't change the primary web database environment for all my webservers for one program that wants to use a dated product.
Stephen Grettenberg
Web Applications Specialist
Information Technology
University of Massachusetts, Amherst
stephen.grettenberg@umass.eduhttp://stephen.grettenberg@umass.edu
Life shrinks or expands in proportion to one's courage
We cannot solve our problems with the same thinking we used when we created them.
What is a weed? A plant whose virtues have never been discovered.
From: Franz Liedke notifications@github.com Sent: Tuesday, February 13, 2018 2:24:22 PM To: flarum/core Cc: Stephen Grettenberg; Mention Subject: Re: [flarum/core] MariaDB 10.2.7+ nullable date/time (Invalid default value for 'notifications_read_time') (#1211)
Again, we're waiting for the upstream release; until then, we should not advertise compatiblity with MariaDB.
— You are receiving this because you were mentioned. Reply to this email directly, view it on GitHubhttps://github.com/flarum/core/issues/1211#issuecomment-365375422, or mute the threadhttps://github.com/notifications/unsubscribe-auth/Ae_dwKGvLlm8-jKSVYeOiVBAdYRhsKYNks5tUeFjgaJpZM4OjKWS.
@grettenberg Flarum is in beta. Currently everything in terms of code is fluctuating, as such keeping concise documentation is a humongous task to handle with the few dedicated staff members at hand. Feel free to assist these good folk by sending in the necessary PR's to clarify where necessary.
The art of being happy lies in the power of extracting happiness from common things. -- Henry Ward Beecher
Server: Localhost via UNIX socket Server type: MariaDB Server version: 10.2.13-MariaDB Database client version: libmysql - mysqlnd 5.0.12-dev - 20150407 - $Id: b5c5906d452ec590732a93b051f3827e02749b83 $
Reproduce the problem
I just ran into this issue and fixed it as follows;
1) I changed vendor/flarum/core/migrations/2015_02_24_000000_create_users_table.php to rename the offending column from notification_read_time to notifications_read_time - as apparently creation works, just alterations do not. 2) I removed vendor/flarum/core/migrations/2015_09_22_030432_rename_notification_read_time.php
Upon installing I ran into the SAME issue in a Flarum extension install - the suspend one - so I performed the same trick there;
1) I changed vendor/flarum/flarum-ext-suspend/migrations/2015_05_11_000000_add_suspended_until_to_users_table.php and changed suspended_until to suspend_until 2) I removed vendor/flarum/flarum-ext-suspend/migrations/2015_09_14_000000_rename_suspended_until_column.php
After this, installation worked.
I realize that this is more of a workaround than an actual fix, so I will not be issuing a merge request or anything. Ultimately, the rename should "just work" and as stated above, this is a problem with DBal that will hopefully be fixed soon.
Running MariaDB 10.2.7 btw!
Version 2.7.0 (and 2.7.1) has been released. I believe this should fix the issue, haven't tested it out. Just throwing it out for anyone still tracking this issue and waiting for dependency to get fixed.
@gboor you just saved my life! I've struggled this for 6 months now... Thank you!
I confirm the latest Flarum is working on mariadb.
@nobicycle thanks for checking I'll update our travis configuration to make sure we remain compliant or know immediately when that's no longer the case.
https://github.com/flarum/core/tree/1211-mariadb-compatibility
We should probably also add the minimum version constraint for doctrine/dbal, right?
Minimum to dbal has to be set to 2.7.0 which demands php 7.1, CI is ready in PR without the constraint.
@franzliedke another reason to increase our own minimum requirement. If we decide to do so it would open up the other discussion (again) of supporting Stratigility 3.x and Laravel 5.6.
@flarum/core what to do?
Worked with doctrine/dbal 2.7.0. Got passed the installation and faced with:
Warning: count(): Parameter must be an array or an object that implements Countable in /flarum/vendor/flarum/core/src/Core/Post/RegisteredTypesScope.php on line 52
Fatal error: Uncaught RuntimeException: Output has been emitted previously; cannot emit response in /flarum/vendor/zendframework/zend-diactoros/src/Response/SapiEmitterTrait.php:41 Stack trace:
#0 /flarum/vendor/zendframework/zend-diactoros/src/Response/SapiEmitter.php(30): Zend\Diactoros\Response\SapiEmitter->assertNoPreviousOutput()
#1 /flarum/vendor/zendframework/zend-diactoros/src/Server.php(167): Zend\Diactoros\Response\SapiEmitter->emit(Object(Zend\Diactoros\Response))
#2 /flarum/vendor/flarum/core/src/Http/AbstractServer.php(36): Zend\Diactoros\Server->listen(Object(Zend\Stratigility\NoopFinalHandler))
#3 /flarum/index.php(16): Flarum\Http\AbstractServer->listen()
#4 {main} thrown in /flarum/vendor/zendframework/zend-diactoros/src/Response/SapiEmitterTrait.php on line 41
Bug report
Getting this error when trying to install:
UPDATE: Adding
composer show