Drupal 7 modules appear to be php8 compatible but crashes when server changes from php7.3 to php8.1

172 Views Asked by At

Somewhere it said that Drupal 7.8 updated core and modules are php compatible with php8.1.

However, when I change the cpanel multiphpmanager for the Drupal 7 domain to php8.1, the site crashes.

The site returns to normal once I return the php to 7.3.

Drupal php testing returns no Drupal 7 php errors (all green.)

I have Drupal 10 running (almost) on the same server and it is running on php8.1

Composer won't work to update Drupal 10 install since the Drupal 7 php is 7.3.

I tried leaving the Drupal 7 site set at php8.1 (crashed) to see if the Drupal 10 install would allow composer to install D10 modules.

However, composer did not recognize the php8 setting. Hence, composer would not allow D10 module installs or upgrades.

Will these two Drupals not co-habitate on the same server at all?

Any Ideas? Thanks Mike B.

_________ added I'm not much of a "developer."

What I mean by "crashes". . . after changing cpanel mulitphp manager for the D7 install (normally runs fine ...no problem) from php7.3 to 8.1 (in an effort to get the D10 install (on the same server. . .now both installs are set to pphp8.1) to allow Composer to install D10 modules. . . the D7 site then shows nothing, blank screen. . .no login page. When I set the D7 install back to php7.3, I can get back the login page.

This is all in an effort to get the Drupal10 install to accept new modules. Composer refuses to update from 2.4.4 to 2.5.7 (root - no permission). I don't use Composer for the D7 install.

In the D7 install I used the "php test. . returns all green. I didn't perceive any relation between the php log file & modules. . .it didn't show which modules weren't compatible and/or which were.

When I try to install the updated Composer the server keeps referring to the root ver.

Thanks for your attn.

1

There are 1 best solutions below

0
EagleUK On

There must be some problems with php 8.1 if when you switch it crashes. You are a bit vague with what testing you have done, have you done automated testing or actually as a developer gone in to test / check things?

Many D7 modules are well known to not have patches merged into new module versions for 8.1.

This includes XML Sitemap, node export, oauth-php, path breadcrumbs, search config, paragraphs, ckeditor link, context, menu attributes, path auto, role assign, workbench. Just as a handful of examples.

What version of composer are you using?

For us we have kept the old composer sat on the servers and also added the new version as a separate file. If composer is complaining about an old version of PHP, then you are using an older version of PHP on command line.

We don't use any form of composer on D7 sites.