Consolidate the php version server or command line











up vote
0
down vote

favorite












In Commandline



$which php



/usr/local/bin/php


$php -v



PHP 7.2.10 (cli) (built: Sep 14 2018 07:07:08) ( NTS )


On Apache check phpinfo();



apache2handler



Apache Version  Apache/2.4.33 (Unix) PHP/7.1.16


I don't understand how apache decides the php path.



How can I make the apache to use the same php as commandline??










share|improve this question


























    up vote
    0
    down vote

    favorite












    In Commandline



    $which php



    /usr/local/bin/php


    $php -v



    PHP 7.2.10 (cli) (built: Sep 14 2018 07:07:08) ( NTS )


    On Apache check phpinfo();



    apache2handler



    Apache Version  Apache/2.4.33 (Unix) PHP/7.1.16


    I don't understand how apache decides the php path.



    How can I make the apache to use the same php as commandline??










    share|improve this question
























      up vote
      0
      down vote

      favorite









      up vote
      0
      down vote

      favorite











      In Commandline



      $which php



      /usr/local/bin/php


      $php -v



      PHP 7.2.10 (cli) (built: Sep 14 2018 07:07:08) ( NTS )


      On Apache check phpinfo();



      apache2handler



      Apache Version  Apache/2.4.33 (Unix) PHP/7.1.16


      I don't understand how apache decides the php path.



      How can I make the apache to use the same php as commandline??










      share|improve this question













      In Commandline



      $which php



      /usr/local/bin/php


      $php -v



      PHP 7.2.10 (cli) (built: Sep 14 2018 07:07:08) ( NTS )


      On Apache check phpinfo();



      apache2handler



      Apache Version  Apache/2.4.33 (Unix) PHP/7.1.16


      I don't understand how apache decides the php path.



      How can I make the apache to use the same php as commandline??







      apache-http-server php






      share|improve this question













      share|improve this question











      share|improve this question




      share|improve this question










      asked Nov 19 at 16:31









      whitebear

      159310




      159310






















          1 Answer
          1






          active

          oldest

          votes

















          up vote
          0
          down vote













          Check your Apache configuration file. There are a couple of things in it that may be used to point to where PHP resides. The first directive is PHPIniDir which may be set to tell Apache where PHP resides.



          The other directive is LoadModule php7_module which tells Apache where to find the PHP module Apache should use.






          share|improve this answer





















            Your Answer








            StackExchange.ready(function() {
            var channelOptions = {
            tags: "".split(" "),
            id: "3"
            };
            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',
            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%2fsuperuser.com%2fquestions%2f1376737%2fconsolidate-the-php-version-server-or-command-line%23new-answer', 'question_page');
            }
            );

            Post as a guest















            Required, but never shown

























            1 Answer
            1






            active

            oldest

            votes








            1 Answer
            1






            active

            oldest

            votes









            active

            oldest

            votes






            active

            oldest

            votes








            up vote
            0
            down vote













            Check your Apache configuration file. There are a couple of things in it that may be used to point to where PHP resides. The first directive is PHPIniDir which may be set to tell Apache where PHP resides.



            The other directive is LoadModule php7_module which tells Apache where to find the PHP module Apache should use.






            share|improve this answer

























              up vote
              0
              down vote













              Check your Apache configuration file. There are a couple of things in it that may be used to point to where PHP resides. The first directive is PHPIniDir which may be set to tell Apache where PHP resides.



              The other directive is LoadModule php7_module which tells Apache where to find the PHP module Apache should use.






              share|improve this answer























                up vote
                0
                down vote










                up vote
                0
                down vote









                Check your Apache configuration file. There are a couple of things in it that may be used to point to where PHP resides. The first directive is PHPIniDir which may be set to tell Apache where PHP resides.



                The other directive is LoadModule php7_module which tells Apache where to find the PHP module Apache should use.






                share|improve this answer












                Check your Apache configuration file. There are a couple of things in it that may be used to point to where PHP resides. The first directive is PHPIniDir which may be set to tell Apache where PHP resides.



                The other directive is LoadModule php7_module which tells Apache where to find the PHP module Apache should use.







                share|improve this answer












                share|improve this answer



                share|improve this answer










                answered Nov 19 at 18:03









                Dave

                16515




                16515






























                     

                    draft saved


                    draft discarded



















































                     


                    draft saved


                    draft discarded














                    StackExchange.ready(
                    function () {
                    StackExchange.openid.initPostLogin('.new-post-login', 'https%3a%2f%2fsuperuser.com%2fquestions%2f1376737%2fconsolidate-the-php-version-server-or-command-line%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

                    "Incorrect syntax near the keyword 'ON'. (on update cascade, on delete cascade,)

                    Alcedinidae

                    RAC Tourist Trophy