-
-
Notifications
You must be signed in to change notification settings - Fork 1.3k
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
PHP Fatal error: Uncaught Doctrine\\DBAL\\DBALException: Failed to connect to the database: Invalid platform version "5.5.5-10.1.25-MariaDB #2819
Comments
@doctrine maintainers: Nextcloud 11: Doctrine 2.5.5 (https://github.com/nextcloud/3rdparty/blob/stable11/composer.json#L11) Is this a problem how the version number is reported by mariaDB here?
This one looks weird, because we didn't changed that much in version numbers in Doctrine. @stfast Did you recently updated the mariaDB server? |
Could you try reproducing the issue in isolation? The example below works fine for me on v2.5.9: <?php
$driver = new \Doctrine\DBAL\Driver\Mysqli\Driver();
$platform = $driver->createDatabasePlatformForVersion('5.5.5-10.1.25-MariaDB');
var_dump($platform);
/*
class Doctrine\DBAL\Platforms\MySqlPlatform#2 (4) {
protected $doctrineTypeMapping =>
NULL
protected $doctrineTypeComments =>
NULL
protected $_eventManager =>
NULL
protected $_keywords =>
NULL
}
*/ |
If you could make a test so that we could reproduce the bug that would be helpfull. |
Will do that ASAP with our developer. I can reproduce it with fresh install of OwnCloud 9.x on any Fedora 2+ and I get same error during installation. Last year I think I had the same issue and I am sure I overcame this error with adding a version "5.5.5-10.1.23-MariaDB" in one of "versions" file, which I could not find it any more. Is there a file where DBAL is checking supported "versisons". |
I get same results: [root@vx1 dbal]# php test.php |
@stfast That's the correct result (aka the connection is working fine and you could thus not reproduce the error). |
See #2825 , I've implemented a fix for that too. |
I've cloned latest dbal version and now I am getting new type of error: [Tue Aug 29 15:38:54.393757 2017] [:error] [pid 30288] [client 172.16.103.21:42650] PHP Fatal error: Uncaught TypeError: Return value of Doctrine\DBAL\DriverManager::_checkParams() must be an instance of Doctrine\DBAL\void, none returned in /owncloud/nextcloud-12.0.2/3rdparty/doctrine/dbal/lib/Doctrine/DBAL/DriverManager.php:213\nStack trace:\n#0 /owncloud/nextcloud-12.0.2/3rdparty/doctrine/dbal/lib/Doctrine/DBAL/DriverManager.php(153): Doctrine\DBAL\DriverManager::_checkParams(Array)\n#1 /owncloud/nextcloud-12.0.2/lib/private/DB/ConnectionFactory.php(149): Doctrine\DBAL\DriverManager::getConnection(Array, Object(Doctrine\DBAL\Configuration), Object(Doctrine\Common\EventManager))\n#2 /owncloud/nextcloud-12.0.2/lib/private/Server.php(579): OC\DB\ConnectionFactory->getConnection('mysql', Array)\n#3 /owncloud/nextcloud-12.0.2/3rdparty/pimple/pimple/src/Pimple/Container.php(113): OC\Server->OC\{closure}(Object(OC\Server))\n#4 /owncloud/nextcloud-12.0.2/lib/private/AppFramework in /owncloud/nextcloud-12.0.2/3rdparty/doctrine/dbal/lib/Doctrine/DBAL/DriverManager.php on line 213 |
@stfast if you run a You need PHP 7.1. |
Upgraded to PHP 7.1.7.
Installed fresh dbal:
[root@owncloud doctrine]# git clone https://github.com/doctrine/dbal.git
Error:
[Tue Aug 29 16:43:45.249115 2017] [php7:error] [pid 49522] [client 172.16.103.21:57080] PHP Fatal error: Uncaught Doctrine\\DBAL\\DBALException: Invalid platform version "5.5.5-10.1.26-MariaDB" specified. The platform version has to be specified in the format: "<major_version>.<minor_version>.<patch_version>". in /owncloud/nextcloud-12.0.2/3rdparty/doctrine/dbal/lib/Doctrine/DBAL/DBALException.php:80\nStack trace:\n#0 /owncloud/nextcloud-12.0.2/3rdparty/doctrine/dbal/lib/Doctrine/DBAL/Driver/AbstractMySQLDriver.php(132): Doctrine\\DBAL\\DBALException::invalidPlatformVersionSpecified('5.5.5-10.1.26-M...', '<major_version>...')\n#1 /owncloud/nextcloud-12.0.2/3rdparty/doctrine/dbal/lib/Doctrine/DBAL/Connection.php(401): Doctrine\\DBAL\\Driver\\AbstractMySQLDriver->createDatabasePlatformForVersion('5.5.5-10.1.26-M...')\n#2 /owncloud/nextcloud-12.0.2/3rdparty/doctrine/dbal/lib/Doctrine/DBAL/Connection.php(340): Doctrine\\DBAL\\Connection->detectDatabasePlatform()\n#3 /owncloud/nextcloud-12.0.2/3rdparty/doctrine/d in /owncloud/nextcloud-12.0.2/3rdparty/doctrine/dbal/lib/Doctrine/DBAL/DBALException.php on line 80
.si
… On Aug 29, 2017, at 3:45 PM, Marco Pivetta ***@***.***> wrote:
@stfast <https://github.com/stfast> if you run a composer install it will tell you that your PHP version is not supported.
You need PHP 7.1.
—
You are receiving this because you were mentioned.
Reply to this email directly, view it on GitHub <#2819 (comment)>, or mute the thread <https://github.com/notifications/unsubscribe-auth/ABEZsUrvmPyOmqGPzPKEMmxyEsOvioLqks5sdBYAgaJpZM4O9Zuh>.
|
When it will be merged to master?
with
"repositories": [
{
"url": "https://github.com/belgattitude/dbal.git",
"type": "vcs"
}
],
"require": {
"php": "^7.1",
"doctrine/dbal": "dev-fix/mariadb/2824 as 2.6.1",
"ext-pdo": "*",
"doctrine/common": "^2.7.1",
"doctrine/orm": "^2.5.0"
},
get this
[root@owncloud dbal]# composer install
Do not run Composer as root/super user! See https://getcomposer.org/root for details
Loading composer repositories with package information
Updating dependencies (including require-dev)
^C[root@owncloud dbal]# vi composer.json
[root@owncloud dbal]# composer install
Do not run Composer as root/super user! See https://getcomposer.org/root for details
Loading composer repositories with package information
Reading composer.json of doctrine/dbal (2.1.0)
Could not fetch https://api.github.com/repos/belgattitude/dbal/contents/composer.json?ref=0127ee98a4301f2f6e3463c824adc3a3687f901f, please create a GitHub OAuth token to go over the API rate limit
Head to https://github.com/settings/tokens/new?scopes=repo&description=Composer+on+owncloud+2017-09-07+1954
to retrieve a token. It will be stored in "/root/.config/composer/auth.json" for future use by Composer.
Token (hidden):
Token stored successfully.
Updating dependencies (including require-dev)
Your requirements could not be resolved to an installable set of packages.
Problem 1
- Can only install one of: doctrine/dbal[dev-fix/mariadb/2824, 2.7.x-dev].
- Can only install one of: doctrine/dbal[2.7.x-dev, dev-fix/mariadb/2824].
- Can only install one of: doctrine/dbal[2.7.x-dev, dev-fix/mariadb/2824].
- Installation request for doctrine/dbal dev-fix/mariadb/2824 as 2.6.1 -> satisfiable by doctrine/dbal[dev-fix/mariadb/2824].
- Installation request for doctrine/dbal 2.7.x-dev -> satisfiable by doctrine/dbal[2.7.x-dev].
|
@stfast, yes github rate limiting is reached. If you are in a hurry, you can follow the link displayed in the composer error message. Basically it just allows your machine to make more requests. Then relaunch composer update. Of course the best is to wait for pr merge. I don't know when, but feel free to ask the question in #2825. |
Since I opened this bug, I found there is no issue at all if you disable pcre.jit in php.ini: cat php.ini And this error dissapears: [Thu Mar 01 18:48:16.056472 2018] [php7:error] [pid 9432] [client 10.192.96.14:42479] PHP Fatal error: Uncaught Doctrine\DBAL\DBALException: Failed to connect to the database: Invalid platform version "5.5.5-10.2.12-MariaDB" specified. The platform version has to be specified in the format: "<major_version>.<minor_version>.<patch_version>". in /WWW/Production/owncloud/nextcloud-12.0.5/lib/private/DB/Connection.php:64\nStack trace:\n#0 /WWW/Production/owncloud/nextcloud-12.0.5/3rdparty/doctrine/dbal/lib/Doctrine/DBAL/Connection.php(429): OC\DB\Connection->connect()\n#1 /WWW/Production/owncloud/nextcloud-12.0.5/3rdparty/doctrine/dbal/lib/Doctrine/DBAL/Connection.php(389): Doctrine\DBAL\Connection->getDatabasePlatformVersion()\n#2 /WWW/Production/owncloud/nextcloud-12.0.5/3rdparty/doctrine/dbal/lib/Doctrine/DBAL/Connection.php(328): Doctrine\DBAL\Connection->detectDatabasePlatform()\n#3 /WWW/Production/owncloud/nextcloud-12.0.5/3rdparty/doctrine/dbal/lib/Doctrine/DBAL/Connection.php(623): Doctrine\DBAL\Connection->getDatabasePlatform()\n#4 /WWW/Production/owncloud/n in /WWW/Production/owncloud/nextcloud-12.0.5/lib/private/DB/Connection.php on line 64 |
This thread has been automatically locked since there has not been any recent activity after it was closed. Please open a new issue for related bugs. |
Reporting also here:
nextcloud/server#6193
After upgrade from NextCloud 11 to NextCloud 12 I got this messages and NextCloud Stops working:
error_log-owncloud:[Mon Aug 21 01:15:59.802107 2017] [:error] [pid 47351] [client 172.16.101.54:63176] PHP Fatal error: Uncaught Doctrine\DBAL\DBALException: Failed to connect to the database: Invalid platform version "5.5.5-10.1.25-MariaDB" specified. The platform version has to be specified in the format: "<major_version>.<minor_version>.<patch_version>". in .../nextcloud-12.0.2/lib/private/DB/Connection.php:61\nStack trace:\n#0 :q
(429): OC\DB\Connection->connect()\n#1 .../nextcloud-12.0.2/3rdparty/doctrine/dbal/lib/Doctrine/DBAL/Connection.php(389): Doctrine\DBAL\Connection->getDatabasePlatformVersion()\n#2 .../nextcloud-12.0.2/3rdparty/doctrine/dbal/lib/Doctrine/DBAL/Connection.php(328): Doctrine\DBAL\Connection->detectDatabasePlatform()\n#3 .../nextcloud-12.0.2/3rdparty/doctrine/dbal/lib/Doctrine/DBAL/Connection.php(623): Doctrine\DBAL\Connection->getDatabasePlatform()\n#4 .../n in .../nextcloud-12.0.2/lib/private/DB/Connection.php on line 61
nextcloud/server#6193
Server configuration
Operating system:
Fedora 26
Web server:
Apache httpd 2.4.20
Database:
10.1.25-MariaDB MariaDB Server
PHP version:
PHP 7.0.7
Nextcloud version: (see Nextcloud admin page)
12.+
**Updated from an older Nextcloud/ownCloud or fresh install:
Update from OwnCloud 9.1.0 to NextCloud 10, NextCloud 11 and still working
The text was updated successfully, but these errors were encountered: