Comments (13)
The connection exception is a subclass of the driver exception:
https://github.com/doctrine/dbal/blob/2.5/lib/Doctrine/DBAL/Exception/ConnectionException.php#L29
from managed-edition.
Full stack traces:
> post-install-cmd: Contao\ManagerBundle\Composer\ScriptHandler::initializeApplication
[Doctrine\DBAL\Exception\DriverException]
An exception occured in driver: SQLSTATE[HY000] [2054] Connecting to 3.22,
3.23 & 4.0 servers is not supported
Exception trace:
() at /kunden/xxx/htdocs/projektfolder/contao/v44x/me/vendor/doctrine/dbal/lib/Doctrine/DBAL/Driver/AbstractMySQLDriver.php:115
Doctrine\DBAL\Driver\AbstractMySQLDriver->convertException() at /kunden/xxx/htdocs/projektfolder/contao/v44x/me/vendor/doctrine/dbal/lib/Doctrine/DBAL/DBALException.php:145
Doctrine\DBAL\DBALException::driverException() at /kunden/xxx/htdocs/projektfolder/contao/v44x/me/vendor/doctrine/dbal/lib/Doctrine/DBAL/Driver/PDOMySql/Driver.php:47
Doctrine\DBAL\Driver\PDOMySql\Driver->connect() at /kunden/xxx/htdocs/projektfolder/contao/v44x/me/vendor/doctrine/dbal/lib/Doctrine/DBAL/Connection.php:360
Doctrine\DBAL\Connection->connect() at /kunden/xxx/htdocs/projektfolder/contao/v44x/me/vendor/contao/manager-bundle/src/ContaoManager/Plugin.php:169
Contao\ManagerBundle\ContaoManager\Plugin->getExtensionConfig() at /kunden/xxx/htdocs/projektfolder/contao/v44x/me/vendor/contao/manager-plugin/src/Config/ContainerBuilder.php:65
Contao\ManagerPlugin\Config\ContainerBuilder->getExtensionConfig() at /kunden/xxx/htdocs/projektfolder/contao/v44x/me/vendor/symfony/symfony/src/Symfony/Component/HttpKernel/DependencyInjection/MergeExtensionConfigurationPass.php:34
Symfony\Component\HttpKernel\DependencyInjection\MergeExtensionConfigurationPass->process() at /kunden/xxx/htdocs/projektfolder/contao/v44x/me/vendor/symfony/symfony/src/Symfony/Component/DependencyInjection/Compiler/Compiler.php:143
Symfony\Component\DependencyInjection\Compiler\Compiler->compile() at /kunden/xxx/htdocs/projektfolder/contao/v44x/me/vendor/symfony/symfony/src/Symfony/Component/DependencyInjection/ContainerBuilder.php:746
Symfony\Component\DependencyInjection\ContainerBuilder->compile() at /kunden/xxx/htdocs/projektfolder/contao/v44x/me/vendor/symfony/symfony/src/Symfony/Component/HttpKernel/Kernel.php:577
Symfony\Component\HttpKernel\Kernel->initializeContainer() at /kunden/xxx/htdocs/projektfolder/contao/v44x/me/vendor/contao/manager-bundle/src/HttpKernel/ContaoKernel.php:213
Contao\ManagerBundle\HttpKernel\ContaoKernel->initializeContainer() at /kunden/xxx/htdocs/projektfolder/contao/v44x/me/vendor/symfony/symfony/src/Symfony/Component/HttpKernel/Kernel.php:119
Symfony\Component\HttpKernel\Kernel->boot() at /kunden/xxx/htdocs/projektfolder/contao/v44x/me/vendor/symfony/symfony/src/Symfony/Bundle/FrameworkBundle/Console/Application.php:69
Symfony\Bundle\FrameworkBundle\Console\Application->doRun() at /kunden/xxx/htdocs/projektfolder/contao/v44x/me/vendor/symfony/symfony/src/Symfony/Component/Console/Application.php:125
Symfony\Component\Console\Application->run() at /kunden/xxx/htdocs/projektfolder/contao/v44x/me/vendor/contao/manager-bundle/bin/contao-console:44
[Doctrine\DBAL\Driver\PDOException (2054)]
SQLSTATE[HY000] [2054] Connecting to 3.22, 3.23 & 4.0 servers is not suppor
ted
Exception trace:
() at /kunden/xxx/htdocs/projektfolder/contao/v44x/me/vendor/doctrine/dbal/lib/Doctrine/DBAL/Driver/PDOConnection.php:47
Doctrine\DBAL\Driver\PDOConnection->__construct() at /kunden/xxx/htdocs/projektfolder/contao/v44x/me/vendor/doctrine/dbal/lib/Doctrine/DBAL/Driver/PDOMySql/Driver.php:44
Doctrine\DBAL\Driver\PDOMySql\Driver->connect() at /kunden/xxx/htdocs/projektfolder/contao/v44x/me/vendor/doctrine/dbal/lib/Doctrine/DBAL/Connection.php:360
Doctrine\DBAL\Connection->connect() at /kunden/xxx/htdocs/projektfolder/contao/v44x/me/vendor/contao/manager-bundle/src/ContaoManager/Plugin.php:169
Contao\ManagerBundle\ContaoManager\Plugin->getExtensionConfig() at /kunden/xxx/htdocs/projektfolder/contao/v44x/me/vendor/contao/manager-plugin/src/Config/ContainerBuilder.php:65
Contao\ManagerPlugin\Config\ContainerBuilder->getExtensionConfig() at /kunden/xxx/htdocs/projektfolder/contao/v44x/me/vendor/symfony/symfony/src/Symfony/Component/HttpKernel/DependencyInjection/MergeExtensionConfigurationPass.php:34
Symfony\Component\HttpKernel\DependencyInjection\MergeExtensionConfigurationPass->process() at /kunden/xxx/htdocs/projektfolder/contao/v44x/me/vendor/symfony/symfony/src/Symfony/Component/DependencyInjection/Compiler/Compiler.php:143
Symfony\Component\DependencyInjection\Compiler\Compiler->compile() at /kunden/xxx/htdocs/projektfolder/contao/v44x/me/vendor/symfony/symfony/src/Symfony/Component/DependencyInjection/ContainerBuilder.php:746
Symfony\Component\DependencyInjection\ContainerBuilder->compile() at /kunden/xxx/htdocs/projektfolder/contao/v44x/me/vendor/symfony/symfony/src/Symfony/Component/HttpKernel/Kernel.php:577
Symfony\Component\HttpKernel\Kernel->initializeContainer() at /kunden/xxx/htdocs/projektfolder/contao/v44x/me/vendor/contao/manager-bundle/src/HttpKernel/ContaoKernel.php:213
Contao\ManagerBundle\HttpKernel\ContaoKernel->initializeContainer() at /kunden/xxx/htdocs/projektfolder/contao/v44x/me/vendor/symfony/symfony/src/Symfony/Component/HttpKernel/Kernel.php:119
Symfony\Component\HttpKernel\Kernel->boot() at /kunden/xxx/htdocs/projektfolder/contao/v44x/me/vendor/symfony/symfony/src/Symfony/Bundle/FrameworkBundle/Console/Application.php:69
Symfony\Bundle\FrameworkBundle\Console\Application->doRun() at /kunden/xxx/htdocs/projektfolder/contao/v44x/me/vendor/symfony/symfony/src/Symfony/Component/Console/Application.php:125
Symfony\Component\Console\Application->run() at /kunden/xxx/htdocs/projektfolder/contao/v44x/me/vendor/contao/manager-bundle/bin/contao-console:44
The problem is actually that the manager-bundle only catches Doctrine\DBAL\Exception\ConnectionException
here during the MySQL connection test: https://github.com/contao/manager-bundle/blob/4.4.4/src/ContaoManager/Plugin.php#L171 .
So this problem was probably introduced in Contao 4.4.0(-RC2) with contao/manager-bundle@06f1f29#diff-e3375107bffc209723fa127bb186d8c6 .
from managed-edition.
As we know, Doctrine (unfortunately) always tries to make a connection to a MySQL server no matter what when initialized
This is not true. If you set dbal.connections.default.server_version
, there will be no connection attempt. And we are already doing this:
from managed-edition.
Yeah the problem seems to be the manager-bundle's own connection test. It connects to the localhost
(since at this point no database has been configured yet), but on Domain Factory, localhost
is an old MySQL 3 server, which leads to the aforementioned exceptions.
from managed-edition.
Yeah the problem seems to be the manager-bundle's own connection test.
Can you point me to the code please?
but on Domain Factory,
localhost
is an old MySQL 3 server
😧
from managed-edition.
See my second comment. The exception occurs here: https://github.com/contao/manager-bundle/blob/4.4.4/src/ContaoManager/Plugin.php#L167-L181
This connection test only catches as Doctrine\DBAL\Exception\ConnectionException
. However, if the localhost
is an old MySQL 3 server, it throws a Doctrine\DBAL\Exception\DriverException
(and a Doctrine\DBAL\Driver\PDOException
?).
from managed-edition.
😧
It's fine, they still provide MySQL 5 servers, but with mysql5.example.org
as the host name ;). But yeah... it's stupid that the default localhost
one is MySQL 3 ... probably for legacy reasons.
from managed-edition.
This connection test only catches as
Doctrine\DBAL\Exception\ConnectionException
. However, if thelocalhost
is an old MySQL 3 server, it throws aDoctrine\DBAL\Exception\DriverException
(and aDoctrine\DBAL\Driver\PDOException
?).
This should be fixed.
from managed-edition.
Fixed in contao/manager-bundle@9a14ef8 and contao/core-bundle@2eb52f3.
from managed-edition.
@leofeyer wouldn't this change not catch the connection exception that would occur on servers where anyonymous users are allowed (or not allowed... don't remember for which case this was done)?
from managed-edition.
What exactly are you referring to?
from managed-edition.
What exactly are you referring to?
from managed-edition.
Ah I see, I missed that, sorry.
from managed-edition.
Related Issues (20)
- temp-Dir wird nicht korrekt gesetzt/ausgelesen HOT 2
- PHP Fehlermeldungen werden auf dem Bildschirm ausgegeben HOT 17
- composer create-project contao/managed-edition requires PHP 7.1 HOT 5
- Pb with http and https HOT 4
- standard image sizes / standard pixel density in theme HOT 4
- Failed to create symbolic link HOT 3
- There is no "contao-components/ace" asset package HOT 3
- Update composer.lock HOT 10
- Packaged ZIP file contains escaped front slashes in composer.json -> intended behavior? HOT 2
- Using config.component-dir has been deprecated HOT 2
- Definition of class in Service.yml HOT 10
- On Contao 4.7 no sendmail available HOT 1
- Contao minor versions are missing - Download fails HOT 4
- add default config.yml & services.yml to skeleton HOT 4
- Consider running security checker on update/installs HOT 3
- Old links to documentation in managed-edition/README.md HOT 1
- Provide .gitattributes HOT 1
- Broken link in README.md chapter Installation HOT 3
- PHP 8 Compatibility HOT 4
Recommend Projects
-
React
A declarative, efficient, and flexible JavaScript library for building user interfaces.
-
Vue.js
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
-
Typescript
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
-
TensorFlow
An Open Source Machine Learning Framework for Everyone
-
Django
The Web framework for perfectionists with deadlines.
-
Laravel
A PHP framework for web artisans
-
D3
Bring data to life with SVG, Canvas and HTML. 📊📈🎉
-
Recommend Topics
-
javascript
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
-
web
Some thing interesting about web. New door for the world.
-
server
A server is a program made to process requests and deliver data to clients.
-
Machine learning
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
-
Visualization
Some thing interesting about visualization, use data art
-
Game
Some thing interesting about game, make everyone happy.
Recommend Org
-
Facebook
We are working to build community through open source technology. NB: members must have two-factor auth.
-
Microsoft
Open source projects and samples from Microsoft.
-
Google
Google ❤️ Open Source for everyone.
-
Alibaba
Alibaba Open Source for everyone
-
D3
Data-Driven Documents codes.
-
Tencent
China tencent open source team.
from managed-edition.