Problem/Motivation

We need to add PHP 8 stuff to .htaccess files because there is php7 stuff.

Proposed resolution

Add checks for mod_php.c - PHP has changed the module name so we don't have to do this in the future. Yay. See https://www.php.net/manual/en/migration80.other-changes.php - php7_module has been renamed to php_module.

Remaining tasks

User interface changes

None

API changes

None

Data model changes

None

Release notes snippet

The root .htaccess file now has a section for PHP 8 settings. This brings .htaccess files into alignment with Drupal's supported PHP version.

If you have a custom .htaccess file and its PHP settings are working, you can keep using your existing .htaccess file unchanged. If you are upgrading from PHP 7 to PHP 8, you should copy the custom settings that you need from the PHP 7 section to the PHP 8 section.

Comments

alexpott created an issue. See original summary.

alexpott’s picture

Issue summary: View changes
Status: Active » Needs review
Issue tags: +PHP 8.0, +Needs change record
StatusFileSize
new1.82 KB

Here's a patch. We did this late for PHP 7 too... see #2455465: Add mod_php7 check to htaccess and remove php5 code

alexpott’s picture

Issue summary: View changes
gábor hojtsy’s picture

Status: Needs review » Reviewed & tested by the community

Looks good.

Status: Reviewed & tested by the community » Needs work

The last submitted patch, 2: 3186524-2.patch, failed testing. View results

xjm’s picture

Issue tags: +Needs release note

.htaccess changes are an "always release note" category. (What we have is a bit thin I think.)

xjm’s picture

See https://www.drupal.org/project/drupal/releases/9.1.0#htaccess for an example of the language to use.

longwave’s picture

Status: Needs work » Needs review
StatusFileSize
new1.82 KB
new427 bytes

Fixed test failure.

Version: 9.1.x-dev » 9.3.x-dev

Drupal 9.1.10 (June 4, 2021) and Drupal 9.2.10 (November 24, 2021) were the last bugfix releases of those minor version series. Drupal 9 bug reports should be targeted for the 9.3.x-dev branch from now on, and new development or disruptive changes should be targeted for the 9.4.x-dev branch. For more information see the Drupal core minor version schedule and the Allowed changes during the Drupal core release cycle.

vikashsoni’s picture

Patch not applying need to Re-roll for drupal 9.3.x-dev

spokje’s picture

Issue summary: View changes
Status: Needs review » Reviewed & tested by the community
Issue tags: -Needs change record, -Needs release note +9.3.1 release notes

Patch not applying need to Re-roll for drupal 9.3.x-dev

Unsure why, a test run I've started ended up green for 9.3 and 9.4.

RTBC-ing, updated Release notes snippet in IS to match the draft CR, updated draft CR version to 9.3.x and updated tags.

spokje’s picture

Issue summary: View changes

  • alexpott committed 87fc0a7 on 10.0.x
    Issue #3186524 by longwave, alexpott, xjm, Spokje: Fix htaccess files...

  • alexpott committed d0be0af on 9.4.x
    Issue #3186524 by longwave, alexpott, xjm, Spokje: Fix htaccess files...
alexpott’s picture

Status: Reviewed & tested by the community » Fixed
Issue tags: -9.3.1 release notes +9.4.0 release notes

Committed and pushed 87fc0a7d04 to 10.0.x and d0be0af780 to 9.4.x. Thanks!

As this is an htaccess change we can only do this on Drupal 9.4.0 and 10.0.0 so committing there.

spokje’s picture

Version: 9.3.x-dev » 9.4.x-dev

As this is an htaccess change we can only do this on Drupal 9.4.0 and 10.0.0 so committing there.

Thanks @alexpott, changed Version meta-data of this issue accordingly

Status: Fixed » Closed (fixed)

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