Skip to content
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

MariaDB 10.2.7+ nullable date/time (Invalid default value for 'notifications_read_time') #1211

Closed
uidHUB opened this issue Jul 25, 2017 · 54 comments · Fixed by #1440
Closed
Assignees
Labels
Milestone

Comments

@uidHUB
Copy link

uidHUB commented Jul 25, 2017

Bug report

  • Version of Flarum: 0.1.0-beta.7
  • The webserver you are running: apache + nginx
  • PHP version: 7.1.7
  • MySQL version: MariaDB 10.2.7

Getting this error when trying to install:

Something went wrong: SQLSTATE[42000]: Syntax error or access violation: 1067 Invalid default value for 'notifications_read_time' (SQL: ALTER TABLE main_users CHANGE notification_read_time notifications_read_time DATETIME DEFAULT 'NULL')

error

UPDATE: Adding composer show

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
@franzliedke
Copy link
Contributor

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?

@luceos
Copy link
Member

luceos commented Jul 28, 2017

@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.

@luceos
Copy link
Member

luceos commented Jul 28, 2017

Tested on

  • php 7.1.6

    • Mariadb: 10.2.6, works
    • Mariadb: 10.2.7 works mysql Ver 15.1 Distrib 10.2.7-MariaDB, for osx10.12 (x86_64) using readline 5.1
  • php 7.1.7

    • Mariadb 10.2.7 (same as above) FAIL!

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.

@tobyzerner
Copy link
Contributor

That's bizarre

@luceos
Copy link
Member

luceos commented Jul 28, 2017

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.

@tobyzerner
Copy link
Contributor

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?)

@franzliedke
Copy link
Contributor

I thought that is the issue. And had hoped it's due to a bug in the specific version of doctrine/dbal etc.

@luceos
Copy link
Member

luceos commented Jul 28, 2017

Brew is now installing mysql server. I'll let you know in a sec.

@luceos
Copy link
Member

luceos commented Jul 28, 2017

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

@uidHUB
Copy link
Author

uidHUB commented Jul 28, 2017

Also, error reproducible:
https://discuss.flarum.org/d/6342-mysql-error-on-install

@franzliedke
Copy link
Contributor

@KitsuneSolar Again, please post the output of composer show

@uidHUB
Copy link
Author

uidHUB commented Jul 28, 2017

@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

@franzliedke
Copy link
Contributor

Can you do composer require doctrine/dbal v2.5.13 and see whether that works, please?

@uidHUB
Copy link
Author

uidHUB commented Jul 28, 2017

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.

@franzliedke
Copy link
Contributor

Hmm, I tried it with v2.6.0 and it worked just fine for me. So it probably is related to MariaDB.

@sijad
Copy link
Contributor

sijad commented Jul 30, 2017

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') {

@uidHUB
Copy link
Author

uidHUB commented Aug 1, 2017

@sijad working!

@Ocramius
Copy link

Ocramius commented Aug 1, 2017

'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
Copy link

Ocramius commented Aug 1, 2017

Also see doctrine/dbal#2804 (comment)

@franzliedke
Copy link
Contributor

@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...

@uidHUB
Copy link
Author

uidHUB commented Aug 9, 2017

Updated PHP. But error continues....

  • PHP 7.1.8
  • mysql Ver 15.1 Distrib 10.2.7-MariaDB, for Linux (x86_64) using readline 5.1
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

@dsevillamartin
Copy link
Member

dsevillamartin commented Aug 9, 2017

@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.

@luceos
Copy link
Member

luceos commented Aug 10, 2017

@datitisev @KitsuneSolar as my research pointed out this is an issue specific to MariaDB 10.2.7+

@uidHUB
Copy link
Author

uidHUB commented Aug 19, 2017

@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.

@uidHUB
Copy link
Author

uidHUB commented Aug 19, 2017

Can it be because of mysql strict mode?
https://dev.mysql.com/doc/refman/5.7/en/sql-mode.html#sql-mode-strict

@auviagroup
Copy link

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 doctrine/dbal#2825

@tenten8401
Copy link

Having this problem too and it's quite annoying.

@luceos
Copy link
Member

luceos commented Sep 18, 2017

@tenten8401 starting to share you opinion. 😁

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.

@ParitoshBh
Copy link

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 doctrine/dbal#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!

@franzliedke
Copy link
Contributor

Indeed, we're waiting for the new DBAL release to be finished, until then there's not much we can do, I'm afraid.

@luceos
Copy link
Member

luceos commented Feb 12, 2018

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 😊

@grettenberg
Copy link

grettenberg commented Feb 12, 2018 via email

@ParitoshBh
Copy link

@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!

@franzliedke
Copy link
Contributor

Again, we're waiting for the upstream release; until then, we should not advertise compatiblity with MariaDB.

@grettenberg
Copy link

grettenberg commented Feb 13, 2018 via email

@luceos
Copy link
Member

luceos commented Feb 13, 2018

@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

@aybru
Copy link

aybru commented Mar 24, 2018

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

@gboor
Copy link

gboor commented Apr 9, 2018

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!

@ParitoshBh
Copy link

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.

@pigszel
Copy link

pigszel commented May 13, 2018

@gboor you just saved my life! I've struggled this for 6 months now... Thank you!

@nobicycle
Copy link

I confirm the latest Flarum is working on mariadb.

@luceos
Copy link
Member

luceos commented May 22, 2018

@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

@luceos luceos added the Test label May 22, 2018
@franzliedke
Copy link
Contributor

We should probably also add the minimum version constraint for doctrine/dbal, right?

@luceos
Copy link
Member

luceos commented May 28, 2018

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?

Ref https://travis-ci.org/flarum/core/builds/384606123

@luceos luceos self-assigned this May 28, 2018
@luceos luceos added this to the 0.1.0-beta.8 milestone May 28, 2018
luceos added a commit that referenced this issue May 29, 2018
fixes #1211 

As we've already upgraded our minimum requirement to 7.1 there's no current need to force a constraint on dbal 2.7+.
@jinjie
Copy link

jinjie commented Jul 8, 2018

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

franzliedke added a commit that referenced this issue Jul 8, 2018
This update is needed to fix MariaDB compatibility.
See #1211.
@franzliedke
Copy link
Contributor

@jinjie Please try again with the latest dev-master. The line referenced in the error message does not even exist in the latest version. 😉

@luceos Just FYI, I just updated our doctrine/dbal version constraint - this was probably forgotten in #1440?

@luceos
Copy link
Member

luceos commented Jul 9, 2018

@franzliedke yes possibly 👍

@scriptxyz
Copy link

got the same issue on the latest version,

@luceos
Copy link
Member

luceos commented Jul 17, 2018

@LadyGH the latest version being beta 7.1? The fix is for the upcoming beta 8.

I'm going to lock this as enough has been said about MariaDB compatibility, it has been fixed in beta 8 (dev-master) and we have tests for mariadb now.

If you experience a comparable issue after beta 8 has been released, please open a new issue and add the link to this issue in the description.

@flarum flarum locked as resolved and limited conversation to collaborators Jul 17, 2018
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
Projects
None yet
Development

Successfully merging a pull request may close this issue.