Skip to content

PhpMyAdmin requires php-twig > 2.9

This is an issue on buster, and will be for any future buster-backports release. It's not immediately obvious because a lot of functionality works without it.

Version information:

  • Local phpmyadmin 4.9.4 package built for buster from git
  • Everything else is stock buster:
    • PHP is 7.3.11-1~deb10u1 running under php-fpm
    • apache2 2.4.38-3+deb10u3
    • mariadb-server-10.3 1:10.3.18-0+deb10u1, although also affects other databases.

Steps to reproduce:

  • click Import on the server page.
  • Receive error: "Error in processing request, error code: 500"

The server error log reports:

PHP message: PHP Fatal error: Uncaught Twig_Error_Syntax: Unexpected "apply" tag (expecting closing tag for the "set" tag defined near line 27). in /usr/share/phpmyadmin/templates/display/import/javascript.twig:27\nStack trace:\n#0 /usr/share/php/Twig/TokenParser/Set.php(55): Twig_Parser->subparse(Array, true)\n#1 /usr/share/php/Twig/Parser.php(168): Twig_TokenParser_Set->parse(Object(Twig_Token))\n#2 /usr/share/php/Twig/TokenParser/If.php(34): Twig_Parser->subparse(Array)\n#3 /usr/share/php/Twig/Parser.php(168): Twig_TokenParser_If->parse(Object(Twig_Token))\n#4 /usr/share/php/Twig/Parser.php(81): Twig_Parser->subparse(NULL, false)\n#5 /usr/share/php/Twig/Environment.php(533): Twig_Parser->parse(Object(Twig_TokenStream))\n#6 /usr/share/php/Twig/Environment.php(565): Twig_Environment->parse(Object(Twig_TokenStream))\n#7 /usr/share/php/Twig/Environment.php(368): Twig_Environment->compileSource(Object(Twig_Source))\n#8 /usr/share/php/Twig/Template.php(326): Twig_Environment->loadTemplate('display/import/...'...'

The 'apply' tag was added in twig 2.9, but buster ships with 2.6.2. https://twig.symfony.com/doc/2.x/tags/apply.html

Updating the twig version (to 2.12.3-1 in this case) does seem to resolve the issue.

Edited by Ben Charlton
To upload designs, you'll need to enable LFS and have an admin enable hashed storage. More information