[Solved] Pass to php 8.0 for system instead 7.4 version


I prefer ask before to do a mistake. In a Drupal 9.x installation, I just have done a drush updb:

$ drush updb
 [warning] Your PHP installation is too old. Drupal requires at least PHP /8.0/. It is
recommended to upgrade to PHP version /8.0/ or higher for the best ongoing
support. See PHP's version support documentation [1] and the Drupal PHP
requirements [2] page for more information.

[1] http://php.net/supported-versions.php
[2] https://www.drupal.org/docs/system-requirements/php-requirements
 (Currently using PHP 7.4.33
 [success] No pending updates.

$ drush status
Drupal version   : 9.4.8
PHP binary       : /usr/bin/php7.4
PHP config       : /etc/php/7.4/cli/php.ini

So I select the php 8.0 version in this dropdown?

Or I do a:

v-change-sys-php 8.0

Thanks to just confirm the process.

I don’t know if it works when you run php via cli.

You can better edit php version in your user settings… That will also work fine …

In the GUI, I have for my user and the admin a php 8.0 declared

$ php -v
PHP 8.0.25 (cli) (built: Oct 28 2022 18:02:51) ( NTS )
# php -v
PHP 7.4.33 (cli) (built: Nov  8 2022 11:33:35) ( NTS )

So my conclusion is that Drupal (drush, and composer too, perhaps) use the root’s CLI.

This topic was automatically closed 30 days after the last reply. New replies are no longer allowed.