How to enable event MPM Apache 2.4 on Ubuntu 14.04 with thread safe PHP?PHP 7 and apache displays plain text and cannot be restartedWhat is the way to enable MPM worker/event in Ubuntu 16?setresuid operation not permitted when calling via phpApache enable worker mpmHow to check and clean Ubuntu 16.04 from multiple Apache, Mysql, php installations?Enabling threadsafe php7.0.8 with Apache2.4.18 and Ubuntu 16.04.3 (desktop) for LAMP

Is there any specific reason why Delta Air Lines doesn't have a callsign that doesn't conflict with the NATO Phonetic Alphabet?

Is the "p" in "spin" really a "b"?

Can airpod with wrong spelling on the case be original?

Can I cast Haste on myself?

Can I say "guess what" to acknowledge new information?

How do you say "to play Devil's advocate" in German?

Considering the power dissipation of a transistor

Estimating nest egg and inflation

Why does General Grievous say “Ah yes, the negotiator?”

What is a Sexy Phrase™?

How does a Mandalorian eat food if he never takes his helmet off?

Should I perform my first oil before the manual says?

Character Development - Robert Baratheon

Is "那些你很冒險的夢" a common expression or just a song title?

Is it acceptable to say that a divergent series that tends to infinity is 'equal to' infinity?

How did the Corona (Key Hole) satellites film canisters deorbit?

Does saddle height needs to be changed when crank length changes?

How much can I change a NY cheesecakes recipe?

Should high school teachers say “real numbers” before teaching complex numbers?

Germany's Ladenschlussgesetz in comparison to a debatable law in Israel

Selecting Primes from list of list

Fingering for Bach's Toccata in E-minor BWV914

What was this pickled vegetable which I was served at a middle eastern restaurant (description inside)?

Using "um...zu" with past participle



How to enable event MPM Apache 2.4 on Ubuntu 14.04 with thread safe PHP?


PHP 7 and apache displays plain text and cannot be restartedWhat is the way to enable MPM worker/event in Ubuntu 16?setresuid operation not permitted when calling via phpApache enable worker mpmHow to check and clean Ubuntu 16.04 from multiple Apache, Mysql, php installations?Enabling threadsafe php7.0.8 with Apache2.4.18 and Ubuntu 16.04.3 (desktop) for LAMP






.everyoneloves__top-leaderboard:empty,.everyoneloves__mid-leaderboard:empty,.everyoneloves__bot-mid-leaderboard:empty
margin-bottom:0;









24


















I upgraded to Ubuntu Server 14.04 expecting the default apache installation would use the new event MPM, but instead I find the old memory-eating prefork.



I've successfully set up event MPM in Arch Linux, but I'm failing to do so on Ubuntu. I keep getting:



Apache is running a threaded MPM, but your PHP Module is not compiled to be threadsafe. You need to recompile PHP


I' ve already installed php-fpm, and configured apache2 to use it, but since the config files for apache2 are different on Ubuntu, i'm not quite sure whether i'm doing it on the right place.



Any idea on how to make PHP thread safe so I can use apache2 event-mpm? (without having to manually recompile php, of course)










share|improve this question

































    24


















    I upgraded to Ubuntu Server 14.04 expecting the default apache installation would use the new event MPM, but instead I find the old memory-eating prefork.



    I've successfully set up event MPM in Arch Linux, but I'm failing to do so on Ubuntu. I keep getting:



    Apache is running a threaded MPM, but your PHP Module is not compiled to be threadsafe. You need to recompile PHP


    I' ve already installed php-fpm, and configured apache2 to use it, but since the config files for apache2 are different on Ubuntu, i'm not quite sure whether i'm doing it on the right place.



    Any idea on how to make PHP thread safe so I can use apache2 event-mpm? (without having to manually recompile php, of course)










    share|improve this question





























      24













      24









      24


      4






      I upgraded to Ubuntu Server 14.04 expecting the default apache installation would use the new event MPM, but instead I find the old memory-eating prefork.



      I've successfully set up event MPM in Arch Linux, but I'm failing to do so on Ubuntu. I keep getting:



      Apache is running a threaded MPM, but your PHP Module is not compiled to be threadsafe. You need to recompile PHP


      I' ve already installed php-fpm, and configured apache2 to use it, but since the config files for apache2 are different on Ubuntu, i'm not quite sure whether i'm doing it on the right place.



      Any idea on how to make PHP thread safe so I can use apache2 event-mpm? (without having to manually recompile php, of course)










      share|improve this question
















      I upgraded to Ubuntu Server 14.04 expecting the default apache installation would use the new event MPM, but instead I find the old memory-eating prefork.



      I've successfully set up event MPM in Arch Linux, but I'm failing to do so on Ubuntu. I keep getting:



      Apache is running a threaded MPM, but your PHP Module is not compiled to be threadsafe. You need to recompile PHP


      I' ve already installed php-fpm, and configured apache2 to use it, but since the config files for apache2 are different on Ubuntu, i'm not quite sure whether i'm doing it on the right place.



      Any idea on how to make PHP thread safe so I can use apache2 event-mpm? (without having to manually recompile php, of course)







      14.04 server apache2 php






      share|improve this question















      share|improve this question













      share|improve this question




      share|improve this question








      edited Aug 5 '14 at 6:45









      Bernmeister

      1,2212 gold badges14 silver badges34 bronze badges




      1,2212 gold badges14 silver badges34 bronze badges










      asked Apr 23 '14 at 5:32









      TowermanTowerman

      3431 gold badge2 silver badges5 bronze badges




      3431 gold badge2 silver badges5 bronze badges























          6 Answers
          6






          active

          oldest

          votes


















          38



















          To disable event MPM, you can do sudo a2dismod mpm_event and after that to enable prefork, you should do sudo a2enmod mpm_prefork.



          Finally restart apache:



          sudo service apache2 restart





          share|improve this answer






















          • 3





            You need to be there... Not here.. there... on the top of the Answers list.

            – Karma
            Aug 13 '16 at 9:47






          • 2





            This should be the accepted answer! Don't forget to restart apache after doing this: sudo service apache2 restart

            – Reeno
            Aug 22 '16 at 16:11






          • 4





            How does this answer the question of how to enable MPM, like the OP asked? You're explaining how to do the opposite of what the OP asked for.

            – Craig
            Mar 6 '17 at 8:05






          • 2





            @Mehraban, OP asked word for word "How to enable event MPM?", and your answer is "Just disable event MPM". How is this an acceptable answer?

            – Nicolas Bouliane
            Oct 1 '17 at 14:08






          • 1





            @Mehraban That's not the question that was asked though, so all the traffic coming here from Google is getting told "the best way to do X is not do to X". If I ask how to make chocolate cookies, I expect a chocolate cookie recipe.

            – Nicolas Bouliane
            Oct 2 '17 at 11:02


















          13



















          This worked for me.



          First check if you have this package installed:



          dpkg -l | grep libapache2-mod-php5


          If you have it just remove it:



          apt-get remove libapache2-mod-php5





          share|improve this answer

























          • This is the correct answer!

            – DrSvanHay
            Aug 25 '18 at 16:42


















          6



















          You can install multiple ways for Apache to communicate with PHP in parallel. Maybe you have (still) the old mod_php installed, additionally to fastcgi/php-fpm.



          You can see which modules your Apache has loaded at runtime with



          apache2ctl -M


          If needed, use sudo to get root privileges. If you see php5_module (shared) among the modules your Apache is currently using, the old mod_php is still installed and blocks you from using mpm_worker or mpm_event.






          share|improve this answer




















          • 5





            Can't run that to get mods if the server is not starting, try sudo a2dismod then hit the tab character twice to see a list if mods that can be disabled. If you see php5 diable it.

            – pferrel
            Mar 19 '15 at 16:41


















          2



















          For me following fully work on debian:



          1. Disable prefork, enable event: a2dismod mpm_prefork && a2enmod mpm_event

          2. remove mod-php5: aptitude remove libapache2-mod-php5

          3. Be aware that you have each php_ Option in your VHost encapsulate by <IfModule mod_php5.c></IfModule>, otherwise apache won't restart

          4. do service apache2 restart





          share|improve this answer
































            1



















            Look for the following in the Load Modules sections of your apache configuration file :



            LoadModule mpm_event_module modules/mod_mpm_event.so


            And replace it with the following module :



            LoadModule mpm_prefork_module modules/mod_mpm_prefork.so





            share|improve this answer

























            • NO, don't do this! Apache is build modular, so you don't have to change any LoadModule-Lines into your configs. Only do a2dismod mpm_prefork && a2enmod mpm_event. Then restart your apache, and you're done.

              – suther
              Oct 10 '17 at 10:26


















            0



















            the php5 module needs the prefork mpm, and to disable prefork, one has to disable php5.



            under debian, i did the following, as root:



            disable the prefork mpm



            a2dismod mpm_prefork


            enable the event mpm, or whatever mpm you might prefer.
            note i found event mpm was not recommended for apache 2.2 or earlier



            a2enmod mpm_event


            to disable the php5 module load, but without uninstallation.



            a2dismod php5


            to test the overall correctness of the resulting apache config.
            errors would need to be coped with as per the answer of @sulther above.



            apache2ctl -t


            restart apache



            systemctl restart apache2


            in case php is still needed, a threadsafe version should be installed.
            see: https://www.digitalocean.com/community/tutorials/how-to-configure-apache-http-with-mpm-event-and-php-fpm-on-freebsd-12-0



            good luck






            share|improve this answer




























              Your Answer








              StackExchange.ready(function()
              var channelOptions =
              tags: "".split(" "),
              id: "89"
              ;
              initTagRenderer("".split(" "), "".split(" "), channelOptions);

              StackExchange.using("externalEditor", function()
              // Have to fire editor after snippets, if snippets enabled
              if (StackExchange.settings.snippets.snippetsEnabled)
              StackExchange.using("snippets", function()
              createEditor();
              );

              else
              createEditor();

              );

              function createEditor()
              StackExchange.prepareEditor(
              heartbeatType: 'answer',
              autoActivateHeartbeat: false,
              convertImagesToLinks: true,
              noModals: true,
              showLowRepImageUploadWarning: true,
              reputationToPostImages: 10,
              bindNavPrevention: true,
              postfix: "",
              imageUploader:
              brandingHtml: "Powered by u003ca class="icon-imgur-white" href="https://imgur.com/"u003eu003c/au003e",
              contentPolicyHtml: "User contributions licensed under u003ca href="https://creativecommons.org/licenses/by-sa/4.0/"u003ecc by-sa 4.0 with attribution requiredu003c/au003e u003ca href="https://stackoverflow.com/legal/content-policy"u003e(content policy)u003c/au003e",
              allowUrls: true
              ,
              onDemand: true,
              discardSelector: ".discard-answer"
              ,immediatelyShowMarkdownHelp:true
              );



              );














              draft saved

              draft discarded
















              StackExchange.ready(
              function ()
              StackExchange.openid.initPostLogin('.new-post-login', 'https%3a%2f%2faskubuntu.com%2fquestions%2f453377%2fhow-to-enable-event-mpm-apache-2-4-on-ubuntu-14-04-with-thread-safe-php%23new-answer', 'question_page');

              );

              Post as a guest















              Required, but never shown


























              6 Answers
              6






              active

              oldest

              votes








              6 Answers
              6






              active

              oldest

              votes









              active

              oldest

              votes






              active

              oldest

              votes









              38



















              To disable event MPM, you can do sudo a2dismod mpm_event and after that to enable prefork, you should do sudo a2enmod mpm_prefork.



              Finally restart apache:



              sudo service apache2 restart





              share|improve this answer






















              • 3





                You need to be there... Not here.. there... on the top of the Answers list.

                – Karma
                Aug 13 '16 at 9:47






              • 2





                This should be the accepted answer! Don't forget to restart apache after doing this: sudo service apache2 restart

                – Reeno
                Aug 22 '16 at 16:11






              • 4





                How does this answer the question of how to enable MPM, like the OP asked? You're explaining how to do the opposite of what the OP asked for.

                – Craig
                Mar 6 '17 at 8:05






              • 2





                @Mehraban, OP asked word for word "How to enable event MPM?", and your answer is "Just disable event MPM". How is this an acceptable answer?

                – Nicolas Bouliane
                Oct 1 '17 at 14:08






              • 1





                @Mehraban That's not the question that was asked though, so all the traffic coming here from Google is getting told "the best way to do X is not do to X". If I ask how to make chocolate cookies, I expect a chocolate cookie recipe.

                – Nicolas Bouliane
                Oct 2 '17 at 11:02















              38



















              To disable event MPM, you can do sudo a2dismod mpm_event and after that to enable prefork, you should do sudo a2enmod mpm_prefork.



              Finally restart apache:



              sudo service apache2 restart





              share|improve this answer






















              • 3





                You need to be there... Not here.. there... on the top of the Answers list.

                – Karma
                Aug 13 '16 at 9:47






              • 2





                This should be the accepted answer! Don't forget to restart apache after doing this: sudo service apache2 restart

                – Reeno
                Aug 22 '16 at 16:11






              • 4





                How does this answer the question of how to enable MPM, like the OP asked? You're explaining how to do the opposite of what the OP asked for.

                – Craig
                Mar 6 '17 at 8:05






              • 2





                @Mehraban, OP asked word for word "How to enable event MPM?", and your answer is "Just disable event MPM". How is this an acceptable answer?

                – Nicolas Bouliane
                Oct 1 '17 at 14:08






              • 1





                @Mehraban That's not the question that was asked though, so all the traffic coming here from Google is getting told "the best way to do X is not do to X". If I ask how to make chocolate cookies, I expect a chocolate cookie recipe.

                – Nicolas Bouliane
                Oct 2 '17 at 11:02













              38















              38











              38









              To disable event MPM, you can do sudo a2dismod mpm_event and after that to enable prefork, you should do sudo a2enmod mpm_prefork.



              Finally restart apache:



              sudo service apache2 restart





              share|improve this answer
















              To disable event MPM, you can do sudo a2dismod mpm_event and after that to enable prefork, you should do sudo a2enmod mpm_prefork.



              Finally restart apache:



              sudo service apache2 restart






              share|improve this answer















              share|improve this answer




              share|improve this answer








              edited Aug 23 '16 at 9:52

























              answered May 16 '16 at 8:55









              MehrabanMehraban

              9052 gold badges13 silver badges24 bronze badges




              9052 gold badges13 silver badges24 bronze badges










              • 3





                You need to be there... Not here.. there... on the top of the Answers list.

                – Karma
                Aug 13 '16 at 9:47






              • 2





                This should be the accepted answer! Don't forget to restart apache after doing this: sudo service apache2 restart

                – Reeno
                Aug 22 '16 at 16:11






              • 4





                How does this answer the question of how to enable MPM, like the OP asked? You're explaining how to do the opposite of what the OP asked for.

                – Craig
                Mar 6 '17 at 8:05






              • 2





                @Mehraban, OP asked word for word "How to enable event MPM?", and your answer is "Just disable event MPM". How is this an acceptable answer?

                – Nicolas Bouliane
                Oct 1 '17 at 14:08






              • 1





                @Mehraban That's not the question that was asked though, so all the traffic coming here from Google is getting told "the best way to do X is not do to X". If I ask how to make chocolate cookies, I expect a chocolate cookie recipe.

                – Nicolas Bouliane
                Oct 2 '17 at 11:02












              • 3





                You need to be there... Not here.. there... on the top of the Answers list.

                – Karma
                Aug 13 '16 at 9:47






              • 2





                This should be the accepted answer! Don't forget to restart apache after doing this: sudo service apache2 restart

                – Reeno
                Aug 22 '16 at 16:11






              • 4





                How does this answer the question of how to enable MPM, like the OP asked? You're explaining how to do the opposite of what the OP asked for.

                – Craig
                Mar 6 '17 at 8:05






              • 2





                @Mehraban, OP asked word for word "How to enable event MPM?", and your answer is "Just disable event MPM". How is this an acceptable answer?

                – Nicolas Bouliane
                Oct 1 '17 at 14:08






              • 1





                @Mehraban That's not the question that was asked though, so all the traffic coming here from Google is getting told "the best way to do X is not do to X". If I ask how to make chocolate cookies, I expect a chocolate cookie recipe.

                – Nicolas Bouliane
                Oct 2 '17 at 11:02







              3




              3





              You need to be there... Not here.. there... on the top of the Answers list.

              – Karma
              Aug 13 '16 at 9:47





              You need to be there... Not here.. there... on the top of the Answers list.

              – Karma
              Aug 13 '16 at 9:47




              2




              2





              This should be the accepted answer! Don't forget to restart apache after doing this: sudo service apache2 restart

              – Reeno
              Aug 22 '16 at 16:11





              This should be the accepted answer! Don't forget to restart apache after doing this: sudo service apache2 restart

              – Reeno
              Aug 22 '16 at 16:11




              4




              4





              How does this answer the question of how to enable MPM, like the OP asked? You're explaining how to do the opposite of what the OP asked for.

              – Craig
              Mar 6 '17 at 8:05





              How does this answer the question of how to enable MPM, like the OP asked? You're explaining how to do the opposite of what the OP asked for.

              – Craig
              Mar 6 '17 at 8:05




              2




              2





              @Mehraban, OP asked word for word "How to enable event MPM?", and your answer is "Just disable event MPM". How is this an acceptable answer?

              – Nicolas Bouliane
              Oct 1 '17 at 14:08





              @Mehraban, OP asked word for word "How to enable event MPM?", and your answer is "Just disable event MPM". How is this an acceptable answer?

              – Nicolas Bouliane
              Oct 1 '17 at 14:08




              1




              1





              @Mehraban That's not the question that was asked though, so all the traffic coming here from Google is getting told "the best way to do X is not do to X". If I ask how to make chocolate cookies, I expect a chocolate cookie recipe.

              – Nicolas Bouliane
              Oct 2 '17 at 11:02





              @Mehraban That's not the question that was asked though, so all the traffic coming here from Google is getting told "the best way to do X is not do to X". If I ask how to make chocolate cookies, I expect a chocolate cookie recipe.

              – Nicolas Bouliane
              Oct 2 '17 at 11:02













              13



















              This worked for me.



              First check if you have this package installed:



              dpkg -l | grep libapache2-mod-php5


              If you have it just remove it:



              apt-get remove libapache2-mod-php5





              share|improve this answer

























              • This is the correct answer!

                – DrSvanHay
                Aug 25 '18 at 16:42















              13



















              This worked for me.



              First check if you have this package installed:



              dpkg -l | grep libapache2-mod-php5


              If you have it just remove it:



              apt-get remove libapache2-mod-php5





              share|improve this answer

























              • This is the correct answer!

                – DrSvanHay
                Aug 25 '18 at 16:42













              13















              13











              13









              This worked for me.



              First check if you have this package installed:



              dpkg -l | grep libapache2-mod-php5


              If you have it just remove it:



              apt-get remove libapache2-mod-php5





              share|improve this answer














              This worked for me.



              First check if you have this package installed:



              dpkg -l | grep libapache2-mod-php5


              If you have it just remove it:



              apt-get remove libapache2-mod-php5






              share|improve this answer













              share|improve this answer




              share|improve this answer










              answered Dec 3 '15 at 2:24









              Carlos MaflaCarlos Mafla

              2312 silver badges4 bronze badges




              2312 silver badges4 bronze badges















              • This is the correct answer!

                – DrSvanHay
                Aug 25 '18 at 16:42

















              • This is the correct answer!

                – DrSvanHay
                Aug 25 '18 at 16:42
















              This is the correct answer!

              – DrSvanHay
              Aug 25 '18 at 16:42





              This is the correct answer!

              – DrSvanHay
              Aug 25 '18 at 16:42











              6



















              You can install multiple ways for Apache to communicate with PHP in parallel. Maybe you have (still) the old mod_php installed, additionally to fastcgi/php-fpm.



              You can see which modules your Apache has loaded at runtime with



              apache2ctl -M


              If needed, use sudo to get root privileges. If you see php5_module (shared) among the modules your Apache is currently using, the old mod_php is still installed and blocks you from using mpm_worker or mpm_event.






              share|improve this answer




















              • 5





                Can't run that to get mods if the server is not starting, try sudo a2dismod then hit the tab character twice to see a list if mods that can be disabled. If you see php5 diable it.

                – pferrel
                Mar 19 '15 at 16:41















              6



















              You can install multiple ways for Apache to communicate with PHP in parallel. Maybe you have (still) the old mod_php installed, additionally to fastcgi/php-fpm.



              You can see which modules your Apache has loaded at runtime with



              apache2ctl -M


              If needed, use sudo to get root privileges. If you see php5_module (shared) among the modules your Apache is currently using, the old mod_php is still installed and blocks you from using mpm_worker or mpm_event.






              share|improve this answer




















              • 5





                Can't run that to get mods if the server is not starting, try sudo a2dismod then hit the tab character twice to see a list if mods that can be disabled. If you see php5 diable it.

                – pferrel
                Mar 19 '15 at 16:41













              6















              6











              6









              You can install multiple ways for Apache to communicate with PHP in parallel. Maybe you have (still) the old mod_php installed, additionally to fastcgi/php-fpm.



              You can see which modules your Apache has loaded at runtime with



              apache2ctl -M


              If needed, use sudo to get root privileges. If you see php5_module (shared) among the modules your Apache is currently using, the old mod_php is still installed and blocks you from using mpm_worker or mpm_event.






              share|improve this answer














              You can install multiple ways for Apache to communicate with PHP in parallel. Maybe you have (still) the old mod_php installed, additionally to fastcgi/php-fpm.



              You can see which modules your Apache has loaded at runtime with



              apache2ctl -M


              If needed, use sudo to get root privileges. If you see php5_module (shared) among the modules your Apache is currently using, the old mod_php is still installed and blocks you from using mpm_worker or mpm_event.







              share|improve this answer













              share|improve this answer




              share|improve this answer










              answered May 25 '14 at 14:50









              Henning KockerbeckHenning Kockerbeck

              4,7201 gold badge21 silver badges28 bronze badges




              4,7201 gold badge21 silver badges28 bronze badges










              • 5





                Can't run that to get mods if the server is not starting, try sudo a2dismod then hit the tab character twice to see a list if mods that can be disabled. If you see php5 diable it.

                – pferrel
                Mar 19 '15 at 16:41












              • 5





                Can't run that to get mods if the server is not starting, try sudo a2dismod then hit the tab character twice to see a list if mods that can be disabled. If you see php5 diable it.

                – pferrel
                Mar 19 '15 at 16:41







              5




              5





              Can't run that to get mods if the server is not starting, try sudo a2dismod then hit the tab character twice to see a list if mods that can be disabled. If you see php5 diable it.

              – pferrel
              Mar 19 '15 at 16:41





              Can't run that to get mods if the server is not starting, try sudo a2dismod then hit the tab character twice to see a list if mods that can be disabled. If you see php5 diable it.

              – pferrel
              Mar 19 '15 at 16:41











              2



















              For me following fully work on debian:



              1. Disable prefork, enable event: a2dismod mpm_prefork && a2enmod mpm_event

              2. remove mod-php5: aptitude remove libapache2-mod-php5

              3. Be aware that you have each php_ Option in your VHost encapsulate by <IfModule mod_php5.c></IfModule>, otherwise apache won't restart

              4. do service apache2 restart





              share|improve this answer





























                2



















                For me following fully work on debian:



                1. Disable prefork, enable event: a2dismod mpm_prefork && a2enmod mpm_event

                2. remove mod-php5: aptitude remove libapache2-mod-php5

                3. Be aware that you have each php_ Option in your VHost encapsulate by <IfModule mod_php5.c></IfModule>, otherwise apache won't restart

                4. do service apache2 restart





                share|improve this answer



























                  2















                  2











                  2









                  For me following fully work on debian:



                  1. Disable prefork, enable event: a2dismod mpm_prefork && a2enmod mpm_event

                  2. remove mod-php5: aptitude remove libapache2-mod-php5

                  3. Be aware that you have each php_ Option in your VHost encapsulate by <IfModule mod_php5.c></IfModule>, otherwise apache won't restart

                  4. do service apache2 restart





                  share|improve this answer














                  For me following fully work on debian:



                  1. Disable prefork, enable event: a2dismod mpm_prefork && a2enmod mpm_event

                  2. remove mod-php5: aptitude remove libapache2-mod-php5

                  3. Be aware that you have each php_ Option in your VHost encapsulate by <IfModule mod_php5.c></IfModule>, otherwise apache won't restart

                  4. do service apache2 restart






                  share|improve this answer













                  share|improve this answer




                  share|improve this answer










                  answered Oct 10 '17 at 10:29









                  suthersuther

                  1214 bronze badges




                  1214 bronze badges
























                      1



















                      Look for the following in the Load Modules sections of your apache configuration file :



                      LoadModule mpm_event_module modules/mod_mpm_event.so


                      And replace it with the following module :



                      LoadModule mpm_prefork_module modules/mod_mpm_prefork.so





                      share|improve this answer

























                      • NO, don't do this! Apache is build modular, so you don't have to change any LoadModule-Lines into your configs. Only do a2dismod mpm_prefork && a2enmod mpm_event. Then restart your apache, and you're done.

                        – suther
                        Oct 10 '17 at 10:26















                      1



















                      Look for the following in the Load Modules sections of your apache configuration file :



                      LoadModule mpm_event_module modules/mod_mpm_event.so


                      And replace it with the following module :



                      LoadModule mpm_prefork_module modules/mod_mpm_prefork.so





                      share|improve this answer

























                      • NO, don't do this! Apache is build modular, so you don't have to change any LoadModule-Lines into your configs. Only do a2dismod mpm_prefork && a2enmod mpm_event. Then restart your apache, and you're done.

                        – suther
                        Oct 10 '17 at 10:26













                      1















                      1











                      1









                      Look for the following in the Load Modules sections of your apache configuration file :



                      LoadModule mpm_event_module modules/mod_mpm_event.so


                      And replace it with the following module :



                      LoadModule mpm_prefork_module modules/mod_mpm_prefork.so





                      share|improve this answer














                      Look for the following in the Load Modules sections of your apache configuration file :



                      LoadModule mpm_event_module modules/mod_mpm_event.so


                      And replace it with the following module :



                      LoadModule mpm_prefork_module modules/mod_mpm_prefork.so






                      share|improve this answer













                      share|improve this answer




                      share|improve this answer










                      answered May 16 '16 at 8:57









                      Ajsti.pl - Maciej SzewczykAjsti.pl - Maciej Szewczyk

                      192 bronze badges




                      192 bronze badges















                      • NO, don't do this! Apache is build modular, so you don't have to change any LoadModule-Lines into your configs. Only do a2dismod mpm_prefork && a2enmod mpm_event. Then restart your apache, and you're done.

                        – suther
                        Oct 10 '17 at 10:26

















                      • NO, don't do this! Apache is build modular, so you don't have to change any LoadModule-Lines into your configs. Only do a2dismod mpm_prefork && a2enmod mpm_event. Then restart your apache, and you're done.

                        – suther
                        Oct 10 '17 at 10:26
















                      NO, don't do this! Apache is build modular, so you don't have to change any LoadModule-Lines into your configs. Only do a2dismod mpm_prefork && a2enmod mpm_event. Then restart your apache, and you're done.

                      – suther
                      Oct 10 '17 at 10:26





                      NO, don't do this! Apache is build modular, so you don't have to change any LoadModule-Lines into your configs. Only do a2dismod mpm_prefork && a2enmod mpm_event. Then restart your apache, and you're done.

                      – suther
                      Oct 10 '17 at 10:26











                      0



















                      the php5 module needs the prefork mpm, and to disable prefork, one has to disable php5.



                      under debian, i did the following, as root:



                      disable the prefork mpm



                      a2dismod mpm_prefork


                      enable the event mpm, or whatever mpm you might prefer.
                      note i found event mpm was not recommended for apache 2.2 or earlier



                      a2enmod mpm_event


                      to disable the php5 module load, but without uninstallation.



                      a2dismod php5


                      to test the overall correctness of the resulting apache config.
                      errors would need to be coped with as per the answer of @sulther above.



                      apache2ctl -t


                      restart apache



                      systemctl restart apache2


                      in case php is still needed, a threadsafe version should be installed.
                      see: https://www.digitalocean.com/community/tutorials/how-to-configure-apache-http-with-mpm-event-and-php-fpm-on-freebsd-12-0



                      good luck






                      share|improve this answer































                        0



















                        the php5 module needs the prefork mpm, and to disable prefork, one has to disable php5.



                        under debian, i did the following, as root:



                        disable the prefork mpm



                        a2dismod mpm_prefork


                        enable the event mpm, or whatever mpm you might prefer.
                        note i found event mpm was not recommended for apache 2.2 or earlier



                        a2enmod mpm_event


                        to disable the php5 module load, but without uninstallation.



                        a2dismod php5


                        to test the overall correctness of the resulting apache config.
                        errors would need to be coped with as per the answer of @sulther above.



                        apache2ctl -t


                        restart apache



                        systemctl restart apache2


                        in case php is still needed, a threadsafe version should be installed.
                        see: https://www.digitalocean.com/community/tutorials/how-to-configure-apache-http-with-mpm-event-and-php-fpm-on-freebsd-12-0



                        good luck






                        share|improve this answer





























                          0















                          0











                          0









                          the php5 module needs the prefork mpm, and to disable prefork, one has to disable php5.



                          under debian, i did the following, as root:



                          disable the prefork mpm



                          a2dismod mpm_prefork


                          enable the event mpm, or whatever mpm you might prefer.
                          note i found event mpm was not recommended for apache 2.2 or earlier



                          a2enmod mpm_event


                          to disable the php5 module load, but without uninstallation.



                          a2dismod php5


                          to test the overall correctness of the resulting apache config.
                          errors would need to be coped with as per the answer of @sulther above.



                          apache2ctl -t


                          restart apache



                          systemctl restart apache2


                          in case php is still needed, a threadsafe version should be installed.
                          see: https://www.digitalocean.com/community/tutorials/how-to-configure-apache-http-with-mpm-event-and-php-fpm-on-freebsd-12-0



                          good luck






                          share|improve this answer
















                          the php5 module needs the prefork mpm, and to disable prefork, one has to disable php5.



                          under debian, i did the following, as root:



                          disable the prefork mpm



                          a2dismod mpm_prefork


                          enable the event mpm, or whatever mpm you might prefer.
                          note i found event mpm was not recommended for apache 2.2 or earlier



                          a2enmod mpm_event


                          to disable the php5 module load, but without uninstallation.



                          a2dismod php5


                          to test the overall correctness of the resulting apache config.
                          errors would need to be coped with as per the answer of @sulther above.



                          apache2ctl -t


                          restart apache



                          systemctl restart apache2


                          in case php is still needed, a threadsafe version should be installed.
                          see: https://www.digitalocean.com/community/tutorials/how-to-configure-apache-http-with-mpm-event-and-php-fpm-on-freebsd-12-0



                          good luck







                          share|improve this answer















                          share|improve this answer




                          share|improve this answer








                          edited Sep 24 at 12:56

























                          answered Sep 23 at 11:12









                          Alex BodnaruAlex Bodnaru

                          11 bronze badge




                          11 bronze badge































                              draft saved

                              draft discarded















































                              Thanks for contributing an answer to Ask Ubuntu!


                              • Please be sure to answer the question. Provide details and share your research!

                              But avoid


                              • Asking for help, clarification, or responding to other answers.

                              • Making statements based on opinion; back them up with references or personal experience.

                              To learn more, see our tips on writing great answers.




                              draft saved


                              draft discarded














                              StackExchange.ready(
                              function ()
                              StackExchange.openid.initPostLogin('.new-post-login', 'https%3a%2f%2faskubuntu.com%2fquestions%2f453377%2fhow-to-enable-event-mpm-apache-2-4-on-ubuntu-14-04-with-thread-safe-php%23new-answer', 'question_page');

                              );

                              Post as a guest















                              Required, but never shown





















































                              Required, but never shown














                              Required, but never shown












                              Required, but never shown







                              Required, but never shown

































                              Required, but never shown














                              Required, but never shown












                              Required, but never shown







                              Required, but never shown









                              Popular posts from this blog

                              Tamil (spriik) Luke uk diar | Nawigatjuun

                              Align equal signs while including text over equalitiesAMS align: left aligned text/math plus multicolumn alignmentMultiple alignmentsAligning equations in multiple placesNumbering and aligning an equation with multiple columnsHow to align one equation with another multline equationUsing \ in environments inside the begintabularxNumber equations and preserving alignment of equal signsHow can I align equations to the left and to the right?Double equation alignment problem within align enviromentAligned within align: Why are they right-aligned?

                              Where does the image of a data connector as a sharp metal spike originate from?Where does the concept of infected people turning into zombies only after death originate from?Where does the motif of a reanimated human head originate?Where did the notion that Dragons could speak originate?Where does the archetypal image of the 'Grey' alien come from?Where did the suffix '-Man' originate?Where does the notion of being injured or killed by an illusion originate?Where did the term “sophont” originate?Where does the trope of magic spells being driven by advanced technology originate from?Where did the term “the living impaired” originate?