Problem/Motivation
I was getting this cryptic error message after running the quick-start command:
In install.core.inc line 2293:
PHP extensions: Disabled
Array
It didn't say what extension was missing, but opening a PHP server with php -S 127.0.0.1:8000/core/install.php I got this at the "Verify requirements" stage:
PHP extensions
Disabled
Drupal requires you to enable the PHP extensions in the following list (see the system requirements page for more information):
- dom
- SimpleXML
- xml
Installing php-xml fixed it.
Steps to reproduce
Uninstall a required Drupal Quick Start PHP extension (for example php-xml) and see that it isn't shown which extension is missing:
- Find installed PHP XML extension versions and uninstall them:
$ dpkg --get-selections | grep -i php | grep xml php-xml install php7.4-xml install $ sudo apt remove --purge php-xml php7.4-xml - Install the PHP XML extension,
run quick-start, and see that it completes.
$ sudo apt install php-xml
Run the quick-start command, and see that it fails with the error above.
Proposed resolution
Fix the code around line https://git.drupalcode.org/project/drupal/-/blob/9.3.x/core/includes/ins... to show the missing PHP extension(s).
Comments
Comment #2
ressaComment #3
ressaComment #4
ressaComment #5
cilefen commentedIs install_display_requirements actually broken or is this more of a CLI display-time issue?
Comment #6
longwaveThis is a bug in
install_display_requirements(), or at least an incorrect assumption.system_requirements()builds the description as a render array as follows:But then in
install_display_requirements()it is assumed that the description is a string, and it is concatenated directly:The
hook_requirements()doc does not state the format of the description key, it only says:Comment #7
longwaveDuplicate of #2833864: Unmet installation requirements may contain render elements
Comment #8
ressaThanks @cilefen and @longwave, I'll try the patch in #2833864: Unmet installation requirements may contain render elements.
I just made two images to show the situation and will post them anyway. They show that the installer works fine in the browser where missing PHP extensions are shown, but not using the
quick-startfrom CLI:Command line, "Array" is shown
Browser, missing PHP extensions are shown