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

Warning: syntax error, unexpected $end, expecting '}' in config.ini.php in libs/upgradephp/upgrade.php #5349

Closed
mattab opened this issue Jun 16, 2014 · 3 comments
Assignees
Labels
Bug For errors / faults / flaws / inconsistencies etc.
Milestone

Comments

@mattab
Copy link
Member

mattab commented Jun 16, 2014

This issue was reported by Jose Luis Zayas by email.

When config/config.ini.php contain value in the format: ${@piwik(c))} then parsing the Ini file will fail, as PHP tries to evaluate values. So PHP will try to read the variable @piwik(c) even though it does not exist.

Looking at parse_ini_file documentation I was delighted to see a third parameter meant to exactly solve this problem. life is good!

@mattab
Copy link
Member Author

mattab commented Jun 16, 2014

In a73266b: Refs #5349 adding failing to showcase bug

@mattab
Copy link
Member Author

mattab commented Jun 16, 2014

In 5a19012: Fixes #5349 Adding flag INI_SCANNER_RAW to prevent error
This should fix the build

@tsteur
Copy link
Member

tsteur commented Jul 8, 2014

In fc2718d: refs #5409 #341 #5349 if a config value contains a dollar sign convert it to an html entity to prevent it being interpreted as a PHP variable. This allows us to remove the RAW ini parser flag which causes trouble on some PHP versions as the parser seems to be buggy.

@mattab mattab added this to the 2.4.0 - Piwik 2.4.0 milestone Jul 8, 2014
@mattab mattab self-assigned this Jul 8, 2014
tsteur added a commit that referenced this issue Jul 9, 2014
…t it to an html entity to prevent it being interpreted as a PHP variable. This allows us to remove the RAW ini parser flag which causes trouble on some PHP versions as the parser seems to be buggy.
This issue was closed.
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Bug For errors / faults / flaws / inconsistencies etc.
Projects
None yet
Development

No branches or pull requests

2 participants