how to enable and disable php7 modules in linux server 16.4












9















I have mad a custom ini files in /etc/php/7.0/mods-available. how can I enable it. I have tried php5enmod, and php7enmod. none worked for me.



Thank you.










share|improve this question



























    9















    I have mad a custom ini files in /etc/php/7.0/mods-available. how can I enable it. I have tried php5enmod, and php7enmod. none worked for me.



    Thank you.










    share|improve this question

























      9












      9








      9


      4






      I have mad a custom ini files in /etc/php/7.0/mods-available. how can I enable it. I have tried php5enmod, and php7enmod. none worked for me.



      Thank you.










      share|improve this question














      I have mad a custom ini files in /etc/php/7.0/mods-available. how can I enable it. I have tried php5enmod, and php7enmod. none worked for me.



      Thank you.







      16.04 php7






      share|improve this question













      share|improve this question











      share|improve this question




      share|improve this question










      asked Nov 21 '16 at 9:01









      Nimatullah RazmjoNimatullah Razmjo

      146115




      146115






















          4 Answers
          4






          active

          oldest

          votes


















          13














          You can simply use the command phpenmod.






          share|improve this answer



















          • 3





            It would be more help if you provided details on how to explicitly use this command.

            – Kevin Bowen
            Dec 2 '16 at 4:34






          • 1





            My "phpenmod" is pointing to php5.6 when I'm running: sudo phpenmod oci8 ===> WARNING: Module oci8 ini file doesn't exist under /etc/php/5.6/mods-available

            – Marcelo Rodovalho
            Aug 22 '17 at 17:51






          • 2





            OFFICIAL MANUAL TOLD ME: usage: phpenmod [ -v ALL|php_version ] [ -s ALL|sapi_name ] module_name [ module_name_2 ] so i run phpenmod -v 7.1 -s apache2 soap version and SAPI you can know from /usr/lib/php/

            – Vladimir Ch
            Jan 17 '18 at 13:53





















          4
















          • phpenmod moduleName enables a module to php7 (restart apache after that sudo service apache2 restart)


          • phpdismod moduleName disables a module to php7 (restart apache after that sudo service apache2 restart)


          • php -m lists the loaded modules






          share|improve this answer































            1















            • To check available modules, run php -m - it's a content of /etc/php/yourPHPVersion/mods-available

            • Select module from the list and enable it (let's say you want to enable soap) phpenmod soap

            • Reload apache2 service apache2 reload or systemctl reload apache2
              And you have a module enabled.


            • To disable the same module, run phpdismod soap, reload apache2 service apache2 reload







            share|improve this answer








            New contributor




            atom_n is a new contributor to this site. Take care in asking for clarification, commenting, and answering.
            Check out our Code of Conduct.




























              0














              If you have several php versions intalled you can also use this syntax:



              phpenmod -v 5.6 <modulename>
              phpenmod -v 7.1 <modulename>
              ...


              That worked in my case because I have 7.0, 7.1, 7.2 and 7.3 installed, but because of requirements I have to run my apache2 with 7.2.






              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/3.0/"u003ecc by-sa 3.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%2f851847%2fhow-to-enable-and-disable-php7-modules-in-linux-server-16-4%23new-answer', 'question_page');
                }
                );

                Post as a guest















                Required, but never shown

























                4 Answers
                4






                active

                oldest

                votes








                4 Answers
                4






                active

                oldest

                votes









                active

                oldest

                votes






                active

                oldest

                votes









                13














                You can simply use the command phpenmod.






                share|improve this answer



















                • 3





                  It would be more help if you provided details on how to explicitly use this command.

                  – Kevin Bowen
                  Dec 2 '16 at 4:34






                • 1





                  My "phpenmod" is pointing to php5.6 when I'm running: sudo phpenmod oci8 ===> WARNING: Module oci8 ini file doesn't exist under /etc/php/5.6/mods-available

                  – Marcelo Rodovalho
                  Aug 22 '17 at 17:51






                • 2





                  OFFICIAL MANUAL TOLD ME: usage: phpenmod [ -v ALL|php_version ] [ -s ALL|sapi_name ] module_name [ module_name_2 ] so i run phpenmod -v 7.1 -s apache2 soap version and SAPI you can know from /usr/lib/php/

                  – Vladimir Ch
                  Jan 17 '18 at 13:53


















                13














                You can simply use the command phpenmod.






                share|improve this answer



















                • 3





                  It would be more help if you provided details on how to explicitly use this command.

                  – Kevin Bowen
                  Dec 2 '16 at 4:34






                • 1





                  My "phpenmod" is pointing to php5.6 when I'm running: sudo phpenmod oci8 ===> WARNING: Module oci8 ini file doesn't exist under /etc/php/5.6/mods-available

                  – Marcelo Rodovalho
                  Aug 22 '17 at 17:51






                • 2





                  OFFICIAL MANUAL TOLD ME: usage: phpenmod [ -v ALL|php_version ] [ -s ALL|sapi_name ] module_name [ module_name_2 ] so i run phpenmod -v 7.1 -s apache2 soap version and SAPI you can know from /usr/lib/php/

                  – Vladimir Ch
                  Jan 17 '18 at 13:53
















                13












                13








                13







                You can simply use the command phpenmod.






                share|improve this answer













                You can simply use the command phpenmod.







                share|improve this answer












                share|improve this answer



                share|improve this answer










                answered Dec 2 '16 at 1:46









                Jeff HinshawJeff Hinshaw

                1312




                1312








                • 3





                  It would be more help if you provided details on how to explicitly use this command.

                  – Kevin Bowen
                  Dec 2 '16 at 4:34






                • 1





                  My "phpenmod" is pointing to php5.6 when I'm running: sudo phpenmod oci8 ===> WARNING: Module oci8 ini file doesn't exist under /etc/php/5.6/mods-available

                  – Marcelo Rodovalho
                  Aug 22 '17 at 17:51






                • 2





                  OFFICIAL MANUAL TOLD ME: usage: phpenmod [ -v ALL|php_version ] [ -s ALL|sapi_name ] module_name [ module_name_2 ] so i run phpenmod -v 7.1 -s apache2 soap version and SAPI you can know from /usr/lib/php/

                  – Vladimir Ch
                  Jan 17 '18 at 13:53
















                • 3





                  It would be more help if you provided details on how to explicitly use this command.

                  – Kevin Bowen
                  Dec 2 '16 at 4:34






                • 1





                  My "phpenmod" is pointing to php5.6 when I'm running: sudo phpenmod oci8 ===> WARNING: Module oci8 ini file doesn't exist under /etc/php/5.6/mods-available

                  – Marcelo Rodovalho
                  Aug 22 '17 at 17:51






                • 2





                  OFFICIAL MANUAL TOLD ME: usage: phpenmod [ -v ALL|php_version ] [ -s ALL|sapi_name ] module_name [ module_name_2 ] so i run phpenmod -v 7.1 -s apache2 soap version and SAPI you can know from /usr/lib/php/

                  – Vladimir Ch
                  Jan 17 '18 at 13:53










                3




                3





                It would be more help if you provided details on how to explicitly use this command.

                – Kevin Bowen
                Dec 2 '16 at 4:34





                It would be more help if you provided details on how to explicitly use this command.

                – Kevin Bowen
                Dec 2 '16 at 4:34




                1




                1





                My "phpenmod" is pointing to php5.6 when I'm running: sudo phpenmod oci8 ===> WARNING: Module oci8 ini file doesn't exist under /etc/php/5.6/mods-available

                – Marcelo Rodovalho
                Aug 22 '17 at 17:51





                My "phpenmod" is pointing to php5.6 when I'm running: sudo phpenmod oci8 ===> WARNING: Module oci8 ini file doesn't exist under /etc/php/5.6/mods-available

                – Marcelo Rodovalho
                Aug 22 '17 at 17:51




                2




                2





                OFFICIAL MANUAL TOLD ME: usage: phpenmod [ -v ALL|php_version ] [ -s ALL|sapi_name ] module_name [ module_name_2 ] so i run phpenmod -v 7.1 -s apache2 soap version and SAPI you can know from /usr/lib/php/

                – Vladimir Ch
                Jan 17 '18 at 13:53







                OFFICIAL MANUAL TOLD ME: usage: phpenmod [ -v ALL|php_version ] [ -s ALL|sapi_name ] module_name [ module_name_2 ] so i run phpenmod -v 7.1 -s apache2 soap version and SAPI you can know from /usr/lib/php/

                – Vladimir Ch
                Jan 17 '18 at 13:53















                4
















                • phpenmod moduleName enables a module to php7 (restart apache after that sudo service apache2 restart)


                • phpdismod moduleName disables a module to php7 (restart apache after that sudo service apache2 restart)


                • php -m lists the loaded modules






                share|improve this answer




























                  4
















                  • phpenmod moduleName enables a module to php7 (restart apache after that sudo service apache2 restart)


                  • phpdismod moduleName disables a module to php7 (restart apache after that sudo service apache2 restart)


                  • php -m lists the loaded modules






                  share|improve this answer


























                    4












                    4








                    4









                    • phpenmod moduleName enables a module to php7 (restart apache after that sudo service apache2 restart)


                    • phpdismod moduleName disables a module to php7 (restart apache after that sudo service apache2 restart)


                    • php -m lists the loaded modules






                    share|improve this answer















                    • phpenmod moduleName enables a module to php7 (restart apache after that sudo service apache2 restart)


                    • phpdismod moduleName disables a module to php7 (restart apache after that sudo service apache2 restart)


                    • php -m lists the loaded modules







                    share|improve this answer












                    share|improve this answer



                    share|improve this answer










                    answered May 25 '18 at 14:48









                    Philippe GachoudPhilippe Gachoud

                    3,3322538




                    3,3322538























                        1















                        • To check available modules, run php -m - it's a content of /etc/php/yourPHPVersion/mods-available

                        • Select module from the list and enable it (let's say you want to enable soap) phpenmod soap

                        • Reload apache2 service apache2 reload or systemctl reload apache2
                          And you have a module enabled.


                        • To disable the same module, run phpdismod soap, reload apache2 service apache2 reload







                        share|improve this answer








                        New contributor




                        atom_n is a new contributor to this site. Take care in asking for clarification, commenting, and answering.
                        Check out our Code of Conduct.

























                          1















                          • To check available modules, run php -m - it's a content of /etc/php/yourPHPVersion/mods-available

                          • Select module from the list and enable it (let's say you want to enable soap) phpenmod soap

                          • Reload apache2 service apache2 reload or systemctl reload apache2
                            And you have a module enabled.


                          • To disable the same module, run phpdismod soap, reload apache2 service apache2 reload







                          share|improve this answer








                          New contributor




                          atom_n is a new contributor to this site. Take care in asking for clarification, commenting, and answering.
                          Check out our Code of Conduct.























                            1












                            1








                            1








                            • To check available modules, run php -m - it's a content of /etc/php/yourPHPVersion/mods-available

                            • Select module from the list and enable it (let's say you want to enable soap) phpenmod soap

                            • Reload apache2 service apache2 reload or systemctl reload apache2
                              And you have a module enabled.


                            • To disable the same module, run phpdismod soap, reload apache2 service apache2 reload







                            share|improve this answer








                            New contributor




                            atom_n is a new contributor to this site. Take care in asking for clarification, commenting, and answering.
                            Check out our Code of Conduct.











                            • To check available modules, run php -m - it's a content of /etc/php/yourPHPVersion/mods-available

                            • Select module from the list and enable it (let's say you want to enable soap) phpenmod soap

                            • Reload apache2 service apache2 reload or systemctl reload apache2
                              And you have a module enabled.


                            • To disable the same module, run phpdismod soap, reload apache2 service apache2 reload








                            share|improve this answer








                            New contributor




                            atom_n is a new contributor to this site. Take care in asking for clarification, commenting, and answering.
                            Check out our Code of Conduct.









                            share|improve this answer



                            share|improve this answer






                            New contributor




                            atom_n is a new contributor to this site. Take care in asking for clarification, commenting, and answering.
                            Check out our Code of Conduct.









                            answered Mar 12 at 18:54









                            atom_natom_n

                            262




                            262




                            New contributor




                            atom_n is a new contributor to this site. Take care in asking for clarification, commenting, and answering.
                            Check out our Code of Conduct.





                            New contributor





                            atom_n is a new contributor to this site. Take care in asking for clarification, commenting, and answering.
                            Check out our Code of Conduct.






                            atom_n is a new contributor to this site. Take care in asking for clarification, commenting, and answering.
                            Check out our Code of Conduct.























                                0














                                If you have several php versions intalled you can also use this syntax:



                                phpenmod -v 5.6 <modulename>
                                phpenmod -v 7.1 <modulename>
                                ...


                                That worked in my case because I have 7.0, 7.1, 7.2 and 7.3 installed, but because of requirements I have to run my apache2 with 7.2.






                                share|improve this answer




























                                  0














                                  If you have several php versions intalled you can also use this syntax:



                                  phpenmod -v 5.6 <modulename>
                                  phpenmod -v 7.1 <modulename>
                                  ...


                                  That worked in my case because I have 7.0, 7.1, 7.2 and 7.3 installed, but because of requirements I have to run my apache2 with 7.2.






                                  share|improve this answer


























                                    0












                                    0








                                    0







                                    If you have several php versions intalled you can also use this syntax:



                                    phpenmod -v 5.6 <modulename>
                                    phpenmod -v 7.1 <modulename>
                                    ...


                                    That worked in my case because I have 7.0, 7.1, 7.2 and 7.3 installed, but because of requirements I have to run my apache2 with 7.2.






                                    share|improve this answer













                                    If you have several php versions intalled you can also use this syntax:



                                    phpenmod -v 5.6 <modulename>
                                    phpenmod -v 7.1 <modulename>
                                    ...


                                    That worked in my case because I have 7.0, 7.1, 7.2 and 7.3 installed, but because of requirements I have to run my apache2 with 7.2.







                                    share|improve this answer












                                    share|improve this answer



                                    share|improve this answer










                                    answered Mar 15 at 21:05









                                    Mihail MinkovMihail Minkov

                                    1187




                                    1187






























                                        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%2f851847%2fhow-to-enable-and-disable-php7-modules-in-linux-server-16-4%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

                                        How did Captain America manage to do this?

                                        迪纳利

                                        南乌拉尔铁路局