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

MalformedDsnException.php on line 12 #517

Open
vlad-dc opened this issue Aug 4, 2023 · 3 comments
Open

MalformedDsnException.php on line 12 #517

vlad-dc opened this issue Aug 4, 2023 · 3 comments
Labels

Comments

@vlad-dc
Copy link

vlad-dc commented Aug 4, 2023

Hello!

I have a problem with a fresh installation, after "php bin/fusio migrate", I have the next error message:

PHP Fatal error: Uncaught Doctrine\DBAL\Exception\MalformedDsnException: Malformed database connection URL in /var/www/fusio/vendor/doctrine/dbal/src/Exception/MalformedDsnException.php:12
Stack trace:
#0 /var/www/fusio/vendor/doctrine/dbal/src/Tools/DsnParser.php(48): Doctrine\DBAL\Exception\MalformedDsnException::new()
#1 /var/www/fusio/vendor/psx/framework/src/Connection/ConnectionFactory.php(55): Doctrine\DBAL\Tools\DsnParser->parse()
#2 /var/www/fusio/cache/container.php(1566): PSX\Framework\Connection\ConnectionFactory->factory()
#3 /var/www/fusio/cache/container.php(6557): ProjectServiceContainer::getConnectionService()
#4 /var/www/fusio/cache/container.php(9117): ProjectServiceContainer::getSchemaManagerInterfaceService()
#5 /var/www/fusio/cache/container.php(6619): ProjectServiceContainer::getModelCommandService()
#6 /var/www/fusio/vendor/psx/framework/src/Console/ApplicationFactory.php(46): ProjectServiceContainer::{closure}()
#7 /var/www/fusio/cache/container.php(6731): PSX\Framework\Console\ApplicationFactory->factory()
#8 /var/www/fusio/vendor/symfony/dependency-injection/Container.php(232): ProjectServiceContainer::getApplicationService()
#9 /var/www/fusio/vendor/symfony/dependency-injection/Container.php(212): Symfony\Component\DependencyInjection\Container::make()
#10 /var/www/fusio/bin/fusio(46): Symfony\Component\DependencyInjection\Container->get()
#11 {main}
thrown in /var/www/fusio/vendor/doctrine/dbal/src/Exception/MalformedDsnException.php on line 12

I have PHP 8.2.8 on Debian 11.7 server.

Some idea to solve this?

Regards!

@chriskapp
Copy link
Member

Hi @vlad-dc this probably means that the connection string at your .env file APP_CONNECTION is not correctly configured, could you show me the format which you have used, of course please don`t show the actual credentials :)

@vlad-dc
Copy link
Author

vlad-dc commented Aug 5, 2023

Hello Chris,

The connection string look like this:

APP_CONNECTION=pdo-mysql://usuarioBD:passwd@localhost/fusio

@chriskapp
Copy link
Member

@vlad-dc the string looks indeed fine, maybe you need to delete the cache/container.php file since the connection credentials are compiled into the container.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

No branches or pull requests

2 participants