-
-
Notifications
You must be signed in to change notification settings - Fork 9.6k
Unable to set a dbal connection password that starts with '@' using MySQL PDO #7402
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
Comments
have you tried to put your password inside double quotes password: "@SomePassword01" |
plz show your config file how config database plz |
No, I will try so then let you know the result. |
Hi pborreli, #parameter.yml #config.yml Doctrine Configurationdoctrine:
|
ok it's a parameters file but plz show your config file. |
Hi stood, |
I tried test when used a password with '@' and it's ok. Plz test connection with pdo but without sf2 |
Please note that the password must start with '@' |
Yes and it's ok for me but test with windows platform. Plz test connect without sf2? |
I am also using windows (win7) with MySQL 5.6.10. I am able to connect without sf2 the problem occurs only when trying to configure doctrine dbal using from the online _configurator or by changing manually the yaml file. |
Have you test with an other password without '@' ? |
@benamlas Have you try to double quote the value in your |
@benamlas When I said you to double quote values, I don't point the fact to use double instead of single quote, I point the fact to quote the injected parameter ( |
Still the same exception (InvalidTypeException: Invalid type for path "doctrine.dbal.connections.default.password". Expected scalar, but got object.) even with config.yml and parameters.yml entry password double quoted. |
duplicate of #7357 |
@benamlas @egeloen @stood The problem is not with the YAML parser itself, but the way symfony handles the parameter strings inside the YamlLoader (and Dumper). So escaping, doubel/single-quoting the parameter values won't help. I have fixed this (because I had a mailer password starting with '@'), but I don't know when this will be merged unfortunately. Changing the password for now might be the only fast solution at the moment. |
Indeed that what I was expecting ... The exception is clear enough. However, I was thinkig that it is because of the YAML parsing. |
I solve this writing the password in this way: "@@database_password" |
Any update on this ? still not working for me on symfony 2.8.17 |
@cAstraea see comment just above yours: double the |
ah yes , was making a typo in a letter thank you |
@cAstraea Give this user a medal. |
Hello,
I was trying to set my dbal connection using doctrine with MySQL PDO. When setting the yaml config file to use password '@SomePassword01' the framework will expect an object reference rather than a string.
This causes an exception: InvalidTypeException: Invalid type for path "doctrine.dbal.connections.default.password". Expected scalar, but got object.
Can you please have a look?
If this won't be fixed can you please at least make sure than the password requirement are mentioned correctly.
Using standard installation 2.2.0
MySQL Server 5.6
PHP 5.4.12
The text was updated successfully, but these errors were encountered: