Solved thread

This post is marked as solved. If you think the information contained on this thread must be part of the official documentation, please contribute submitting a pull request to its repository.

[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?



34.7k
Accepted
answer

Hello

Try add double " to config for example:

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


1.9k

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

Thanks so much.