Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

php-apache2handler,apache2: add enable-mpms-shared=all as default #8478

Closed
wants to merge 1 commit into from

Conversation

iefdev
Copy link
Contributor

@iefdev iefdev commented Sep 19, 2020

php-apache2handler, apache2: add enable-mpms-shared=all as default arg

  • php-apache2handler: remove req of preforkmpm and PG,
    since it's built by default.
  • Add not about usage.
  • apache2: add enable-mpms-shared=all as default arg, and remove
    variant.

When installing the php-apache2handler it requires the preforkmpm to
be installed, which prevents the use of the other variant on the server
due to conflicts. That was what the mpms_shared_all variant was added
for, to be able to use all different mpms on the same apache2 install -
to be able to set up and run different virtualhosts with different mpms
&/or php versions.

So, it's better to require mpms_shared_all, and then add to the notes
they need to run the php-apache2handler in a preforkmpm mode.


Additionally, one could consider to remove all the preforkmpm/workermpm/eventmpm variants (like I wrote here). enable-mpms-shared=all will default to prefork anyway.

Type(s)
  • enhancement
Tested on

macOS 10.7.5 11G63
Xcode 4.6.3 4H1503

Verification

Have you

Notes

This was the 3'rd commit in #8374, which I'm about to break up into smaller changes. Thought it would be better to keep this one in a separate PR instead.

  - php-apache2handler: remove req of preforkmpm and PG,
    since it's built by default.
  - Add not about usage.
  - apache2: add enable-mpms-shared=all as default arg, and remove
    variant.

---

When installing the php-apache2handler it requires the preforkmpm to
be installed, which prevents the use of the other variant on the server
due to conflicts. That was what the mpms_shared_all variant was added
for, to be able to use all different mpms on the same apache2 install -
to be able to set up and run different virtualhosts with different mpms
&/or php versions.

So, it's better to require mpms_shared_all, and then add to the notes
they need to run the php-apache2handler in a preforkmpm mode.
@macportsbot
Copy link

Notifying maintainers:
@Schamschula for port apache2.
@ryandesign for port php, apache2.

@macportsbot
Copy link

Travis Build #14109 Passed.

Lint results
--->  Verifying Portfile for php
--->  0 errors and 0 warnings found.
--->  Verifying Portfile for apache2
--->  0 errors and 0 warnings found.

Port php74 success on xcode10.3. Log
Port php success on xcode10.3. Log
Port php52 success on xcode10.3. Log
Port php52-calendar success on xcode10.3. Log
Port php52-cgi success on xcode10.3. Log
Port php52-curl success on xcode10.3. Log
Port php52-dba success on xcode10.3. Log
Port php52-exif success on xcode10.3. Log
Port php52-ftp success on xcode10.3. Log
Port php52-gd success on xcode10.3. Log
Port php52-gettext success on xcode10.3. Log
Port php52-gmp success on xcode10.3. Log
Port php52-iconv success on xcode10.3. Log
Port php52-imap success on xcode10.3. Log
Port php52-ipc success on xcode10.3. Log
Port php52-ldap success on xcode10.3. Log
Port php52-mbstring success on xcode10.3. Log
Port php52-mcrypt success on xcode10.3. Log
Port php74 success on xcode9.4. Log
Port php success on xcode9.4. Log
Port php52 success on xcode9.4. Log
Port php52-calendar success on xcode9.4. Log
Port php52-cgi success on xcode9.4. Log
Port php52-curl success on xcode9.4. Log
Port php52-dba success on xcode9.4. Log
Port php52-exif success on xcode9.4. Log
Port php52-ftp success on xcode9.4. Log
Port php52-gd success on xcode9.4. Log
Port php52-gettext success on xcode9.4. Log
Port php52-gmp success on xcode9.4. Log
Port php52-iconv success on xcode9.4. Log
Port php52-imap success on xcode9.4. Log
Port php52-ipc success on xcode9.4. Log
Port php52-ldap success on xcode9.4. Log
Port php52-mbstring success on xcode9.4. Log
Port php52-mcrypt success on xcode9.4. Log
Port php74 success on xcode8.3. Log
Port php success on xcode8.3. Log
Port php52 success on xcode8.3. Log
Port php52-calendar success on xcode8.3. Log
Port php52-cgi success on xcode8.3. Log
Port php52-curl success on xcode8.3. Log
Port php52-dba success on xcode8.3. Log
Port php52-exif success on xcode8.3. Log
Port php52-ftp success on xcode8.3. Log
Port php52-gd success on xcode8.3. Log
Port php52-gettext success on xcode8.3. Log
Port php52-gmp success on xcode8.3. Log
Port php52-iconv success on xcode8.3. Log
Port php52-imap success on xcode8.3. Log
Port php52-ipc success on xcode8.3. Log
Port php52-ldap success on xcode8.3. Log
Port php52-mbstring success on xcode8.3. Log
Port php52-mcrypt success on xcode8.3. Log
Port php74 success on xcode7.3. Log
Port php success on xcode7.3. Log
Port php52 success on xcode7.3. Log
Port php52-calendar success on xcode7.3. Log
Port php52-cgi success on xcode7.3. Log
Port php52-curl success on xcode7.3. Log
Port php52-dba success on xcode7.3. Log
Port php52-exif success on xcode7.3. Log
Port php52-ftp success on xcode7.3. Log
Port php52-gd success on xcode7.3. Log
Port php52-gettext success on xcode7.3. Log
Port php52-gmp success on xcode7.3. Log
Port php52-iconv success on xcode7.3. Log
Port php52-imap success on xcode7.3. Log
Port php52-ipc success on xcode7.3. Log
Port php52-ldap success on xcode7.3. Log
Port php52-mbstring success on xcode7.3. Log
Port php52-mcrypt success on xcode7.3. Log
Port php52-mssql success on xcode7.3. Log
Port php52-mysql success on xcode7.3. Log
Port php52-odbc success on xcode7.3. Log
Port php52-openssl success on xcode7.3. Log

The build timed out.

@ryandesign
Copy link
Contributor

Additionally, one could consider to remove all the preforkmpm/workermpm/eventmpm variants (like I wrote here). enable-mpms-shared=all will default to prefork anyway.

@Schamschula What do you think? Does that work? I am not familiar with the shared mpm feature.

@Schamschula
Copy link
Contributor

@ryandesign I haven't looked into the inner workings of these variants. I would have to do some research.

@iefdev
Copy link
Contributor Author

iefdev commented Oct 2, 2020

The shared mpm feature. With --enable-mpms-shared=all (»»»), they're all built/added and you can use/change them without the need to rebuild.

Or it was presented in What's new in 2.4:

“Run-time Loadable MPMs: Multiple MPMs can now be built as loadable modules at compile time.” »»»

We have it as a variant now, but as you suggested/asked (»»») if we can have this as the default? Yes, we can. And when doing so, the other variants will act as enablers“ - which one to uncomment in the conf.

If we remove the variants, and add prefork as the defult mpm (which I think it will apply to anyway). All that is needed to use the other ones is to uncomments/config to your liking.

On a fresh install:

    ...
    --enable-mpms-shared=all \
    --with-mpm=prefork \
    ...

# result in: http.conf
LoadModule mpm_prefork_module ... ... /mod_mpm_prefork.so
#LoadModule mpm_worker_module ... ... /mod_mpm_worker.so
#LoadModule mpm_event_module  ... ... /mod_mpm_event.so

The idea of adding the mpms as DSO's is to remove the need to rebuild Apache when changing mpm. And with the variants being in conflict with each other, they will now act as enablers for the one being selected as the default. After that one can make wanted changes. The variants can still be there of course. Using +eventmpm would set the event as the default one on a fresh install.

I think it would be better to skip the variants, and set a good default (ie prefork), and leave the config to the user.

@reneeotten
Copy link
Contributor

is this PR something either of you (@iefdev , @Schamschula or @ryandesign ) is interested in finishing up? If not or you want to reject it, then let's just close this as it has been stagnant for the last 8 months or so.

@Schamschula
Copy link
Contributor

As I no longer use apache2 in production on the Mac, I haven't had a reason to look into it. However, I do use apache24 on both my FreeBSD servers, and it seems that FreshPorts does build with --enable-mpms-shared=all by default. This PR will need to be brought up to date with both apache and PHP.

@reneeotten
Copy link
Contributor

@ryandesign what do you want to do with this PR - merge as-is, request changes, or close?

@reneeotten reneeotten closed this Aug 29, 2021
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment