Problem/Motivation

Your Composer dependencies require a PHP version ">= 8.1.6". You are running 8.1.2-1ubuntu2.19.

Steps to reproduce

Install the latest version of Commerce Stripe (8.1.2) - this introduces a dependency on PHP for version >= 8.1.6.

The LTS version on Ubuntu 22.04.5 is PHP 8.1.2-1ubuntu2.19 - the site will then not load.

Proposed resolution

Within composer.json - do we absolutely need the minor version 8.1.6? I expect any critical bug fixes will be backported into the Ubuntu Repo?

"require": {
"php": ">=8.1.6",
"drupal/commerce": "^2.40 || ^3",
"stripe/stripe-php": "^7.25 || ^15",
"ext-curl": "*"
},

Will 8.1.2 suffice - does the dependency come from another project downstream?

I've added a composer dependency on our server platform PHP version - to fix it to:

},
"platform": {
"php": "8.1.2"
}

Which then removes the Stripe update - along with the Stripe-PHP update. Would rather stay on the updated branch - but that would mean me updating my entire Server version to Ubuntu '24.04.1 LTS' - which means Wordpress that is on the same server having "beta" support: https://make.wordpress.org/core/handbook/references/php-compatibility-an...

Other workaround would be to use the approach seen here (would rather stay with LTS repos on Ubuntu):

https://www.drupal.org/forum/support/post-installation/2023-01-04/ubuntu...

Command icon Show commands

Start within a Git clone of the project using the version control instructions.

Or, if you do not have SSH keys set up on git.drupalcode.org:

Comments

newaytech created an issue. See original summary.

tomtech’s picture

Assigned: Unassigned » tomtech

Hi @newaytech!

Thanks for the question.

For php 8.1.x, there is an OPcache bug that is fixed in 8.1.6.

It is recommended to NOT use 8.1.0-8.1.5.

It is surprising to hear that WP only has beta support for PHP8.

In this post, they discuss how to upgrade Ubuntu 22.04 LTS to later PHP 8.1.x:

https://www.drupal.org/forum/support/post-installation/2023-01-04/ubuntu...

Hopefully, this would resolve the issue for you.

newaytech’s picture

Thanks @tomtech. I've taken the plunge and am now using the custom repos for both PHP and Apache...

tomtech’s picture

We've had reports that some hosting are running php 8.1.x with patches to resolve the issue, but are not able to upgrade to 8.1.6 or later for some reason.

This change lowers the php version requirement to 8.1 to assist those sites.

It is still highly recommended that you use 8.1.6 or later.

If you are using php 8.1.x < 8.1.6, please ensure you have the patch in place to avoid any issues on your site.

  • 6a95ebca committed on 8.x-1.x
    Issue #3485881 by tomtech, newaytech: PHP version issue on Ubuntu 22.04....
tomtech’s picture

Status: Active » Fixed

Status: Fixed » Closed (fixed)

Automatically closed - issue fixed for 2 weeks with no activity.