Skip to content

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

Description

@mattab

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!

Activity

  1. mattab commented on Jun 16, 2014

    @mattab
    MemberAuthor

    In a73266b: Refs #5349 adding failing to showcase bug

  2. mattab commented on Jun 16, 2014

    @mattab
    MemberAuthor

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

  3. tsteur commented on Jul 8, 2014

    @tsteur
    Member

    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.

  4. added this to the milestone on Jul 8, 2014
  5. self-assigned this
    on Jul 8, 2014
  6. added a commit that references this issue on Jul 9, 2014
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

Labels

BugFor errors / faults / flaws / inconsistencies etc.

Type

No type

Projects

No projects

    Milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions