We have moved our forum to GitHub Discussions. For questions about Phalcon v3/v4/v5 you can visit here and for Phalcon v6 here.

[Phalcon 3.0 - INVO] How can we use ";" character in the database password with config.ini

I'm using Phalcon 3.0 and PHP 7.04/PHP 5.6 and testing Invo web application.

In file config.ini, I using this configuration:

[database]
adapter  = Mysql
host     = localhost
username = admin
password = *123456;*
dbname   = invo

[application]
controllersDir = app/controllers/
modelsDir      = app/models/
viewsDir       = app/views/
pluginsDir     = app/plugins/
formsDir       = app/forms/
libraryDir     = app/library/
baseUri        = /invo/

So, when the password has ";" character, Phalcon cannot connect to the database. If I change the password from "123456;" to "123456", everything is normal.

How can I use the ";" character with config.ini file?



58.4k
Accepted
answer

Hello

Try add double " to config for example:

[database]
adapter  = Mysql
host     = localhost
username = root
password = "phanbook123455;"
name     = phanbook


6.0k

I tested with '123456;', that doesn't work but with "123456;" it's ok now.

Thanks so much.