fix: add mod_php8 IfModule block to .htaccess#41612
Conversation
|
Thanks for opening this pull request! The maintainers of this repository would appreciate it if you would create a changelog item based on your changes. |
|
Q: why not removing the outdated other directives? (and moving the block to the bottom?) |
DeepDiver1975
left a comment
There was a problem hiding this comment.
Adds a <IfModule mod_php8.c> block to .htaccess and removes the now-obsolete mod_php5.c and mod_php7.c blocks.
The fix is correct and the omissions are intentional and well-explained:
mbstring.func_overloadremoved in PHP 8.0 — correctly absent from the new block.always_populate_raw_post_datawas PHP 5 only — correctly absent.php_value default_charsetandoutput_bufferingare retained — correct.
One thing to verify: mod_php7.c being removed means PHP 7.x installations will silently fall back to compiled-in defaults for upload_max_filesize, post_max_size, memory_limit, etc. If the project still supports PHP 7.4 (Ubuntu 22.04 Docker image does), consider retaining the mod_php7.c block rather than replacing it. The companion PR owncloud-docker/base#472 adds these values to the PHP ini for the Docker image, which covers the Docker case — but bare (non-Docker) PHP 7.x installs relying on .htaccess would regress.
If PHP 7.x is no longer a supported target for this .htaccess, the removal is fine and this is ready to merge.
phil-davis
left a comment
There was a problem hiding this comment.
Should this have a changelog?
fix: remove obsolete mod_php5 and mod_php7 IfModule blocks
79c95d4 to
c44c1ba
Compare
Summary
PHP 8 registers its Apache module as
mod_php8.c, notmod_php7.c. The existing.htaccessonly has<IfModule mod_php5.c>and<IfModule mod_php7.c>blocks, so on PHP 8 installs allphp_valuedirectives (upload limits, memory limit, charset, output buffering) are silently ignored.This PR adds a
<IfModule mod_php8.c>block mirroring themod_php7.cblock, with one intentional omission:mbstring.func_overloadwas removed in PHP 8.0 and must not appear in the PHP 8 block.Changes
.htaccess: new<IfModule mod_php8.c>block added after themod_php7.cblock, withoutmbstring.func_overloadRelated
Raised in context of #41611 (big file upload configuration / Docker PHP 8 support).