| Summary: | Regression, apache serve raw php content | ||
|---|---|---|---|
| Product: | Mageia | Reporter: | Raphael Gertz <mageia> |
| Component: | RPM Packages | Assignee: | Marc Krämer <mageia> |
| Status: | NEW --- | QA Contact: | |
| Severity: | normal | ||
| Priority: | Normal | CC: | fri |
| Version: | Cauldron | ||
| Target Milestone: | --- | ||
| Hardware: | All | ||
| OS: | Linux | ||
| URL: | https://serverfault.com/questions/1161867/apache-serving-raw-text-php-files-after-update-to-2-4-60 | ||
| Whiteboard: | MGA9TOO | ||
| Source RPM: | php-8.3.9-1.mga10.src.rpm | CVE: | |
| Status comment: | |||
| Bug Depends on: | 33358 | ||
| Bug Blocks: | |||
|
Description
Raphael Gertz
2024-07-02 17:22:21 CEST
See link for explanation of regression. I changed AddType to AddHandler in these files: /etc/httpd/conf/modules.d/70_mod_php.conf /etc/httpd/conf/sites.d/0x_xxx.example.com_vhosts.conf /etc/httpd/conf/httpd.conf Since then it seems to works correctly again. Nicolas, you pushed it on build system. Could you push a version with notes that display upon installation? Apache have updated their notes, see link in URL field in this bug. CC:
(none) =>
fri It may be nice to have at least mod_php/mod_perl/mod_etc working by default.
katnatek
2024-07-03 03:44:05 CEST
Blocks:
(none) =>
33353 For what I saw, mod_perl is already using AddHandler rather than AddType. According to https://lists.apache.org/thread/hgnpfrwjy68rs0vdl9f3xlgj2ngrmkjp, using "AddType application/x-httpd-php .php" has been invalid for at least 15 years. I will add a file README.urpmi into apache-2.4.60-2.mga9 and apache-2.4.60-2.mga10. But, regarding that bug, the problem is with php, not apache. Version:
9 =>
Cauldron in case php-fpm is running this should not happen. As a handler is setup to handle php files. I guess this directive only matches, if php-fpm is not running. Will be adressed, in the next php update (comming today)
Marc Krämer
2024-07-03 14:51:48 CEST
Depends on:
(none) =>
33358
Marc Krämer
2024-07-03 14:52:33 CEST
Depends on:
33358 =>
(none)
Marc Krämer
2024-07-03 14:53:09 CEST
Depends on:
(none) =>
33358 (In reply to Marc Krämer from comment #5) > in case php-fpm is running this should not happen. As a handler is setup to > handle php files. > > I guess this directive only matches, if php-fpm is not running. > > Will be adressed, in the next php update (comming today) The problem happened with mod_php in my case. Please update backported mga9 php version too if possible. @Raphael, if you have enabled mod_php (which is "deprecated"), you don't need php-fpm-apache which caused this. The change is for backports too. I suggest to switch to php-fpm. Sorry, but the "fix" by adding a note in a README.urpmi about the AddType don't seems to be really smart, it will not work by default. Would it be possible to fix apache-mod_php8.3 to depend on new apache 2.4.60 version and replace the AddType by AddHandler in /etc/httpd/conf/modules.d/70_mod_php.conf ? I didn't find why mod_php is deprecated, looks like a rhel choice, may you point to a reference explaining it ? a) no Readme is not needed b) is fixed in [updates,backports]_testing c) no, not just rhel - it is not officially deprecated - but I would consider switching: - php-fpm is independent of the webserver - integrated php in apache makes it bigger,slower with each request, whether php is used or not - apache must run in non threaded mode (prefork only) - bugs in mod_php may make apache volunerable - php can run in different contexts (security) A few more things can be found here: https://www.php.net/manual/en/install.fpm.php Also please test with new apache packages https://bugs.mageia.org/show_bug.cgi?id=33353#c8 |