Problem with 2 php version and openssl

The name of the pictureThe name of the pictureThe name of the pictureClash Royale CLAN TAG#URR8PPP











up vote
0
down vote

favorite












Hello I got 2 errors I don't know how to solve.



First: installed manually the php7.1.10 and the installed by apt-get the version 7.1.11 (following this steps). Know with a phpinfo() I get PHP Version 7.1.11-1 but inside terminal I get 7.1.10. How can I change the cli inside terminal so I get the same version?



Second: I'm getting this error The openssl extension is required for SSL/TLS protection but is not available. making a php composer.phar install. Inside the phpinfo I get OPENSSL support enabled but inside terminal I get OpenSSL support => disabled (install ext/openssl). So maybe this could be solved by changing the php version that i'm using inside terminal.



enviroment: debian9, apache 2.4



Any help? thanks!!!







share|improve this question




















  • Can you post the output of type php?
    – datUser
    Oct 30 '17 at 15:56










  • php is /usr/local/bin/php
    – Braian Mellor
    Oct 30 '17 at 15:59














up vote
0
down vote

favorite












Hello I got 2 errors I don't know how to solve.



First: installed manually the php7.1.10 and the installed by apt-get the version 7.1.11 (following this steps). Know with a phpinfo() I get PHP Version 7.1.11-1 but inside terminal I get 7.1.10. How can I change the cli inside terminal so I get the same version?



Second: I'm getting this error The openssl extension is required for SSL/TLS protection but is not available. making a php composer.phar install. Inside the phpinfo I get OPENSSL support enabled but inside terminal I get OpenSSL support => disabled (install ext/openssl). So maybe this could be solved by changing the php version that i'm using inside terminal.



enviroment: debian9, apache 2.4



Any help? thanks!!!







share|improve this question




















  • Can you post the output of type php?
    – datUser
    Oct 30 '17 at 15:56










  • php is /usr/local/bin/php
    – Braian Mellor
    Oct 30 '17 at 15:59












up vote
0
down vote

favorite









up vote
0
down vote

favorite











Hello I got 2 errors I don't know how to solve.



First: installed manually the php7.1.10 and the installed by apt-get the version 7.1.11 (following this steps). Know with a phpinfo() I get PHP Version 7.1.11-1 but inside terminal I get 7.1.10. How can I change the cli inside terminal so I get the same version?



Second: I'm getting this error The openssl extension is required for SSL/TLS protection but is not available. making a php composer.phar install. Inside the phpinfo I get OPENSSL support enabled but inside terminal I get OpenSSL support => disabled (install ext/openssl). So maybe this could be solved by changing the php version that i'm using inside terminal.



enviroment: debian9, apache 2.4



Any help? thanks!!!







share|improve this question












Hello I got 2 errors I don't know how to solve.



First: installed manually the php7.1.10 and the installed by apt-get the version 7.1.11 (following this steps). Know with a phpinfo() I get PHP Version 7.1.11-1 but inside terminal I get 7.1.10. How can I change the cli inside terminal so I get the same version?



Second: I'm getting this error The openssl extension is required for SSL/TLS protection but is not available. making a php composer.phar install. Inside the phpinfo I get OPENSSL support enabled but inside terminal I get OpenSSL support => disabled (install ext/openssl). So maybe this could be solved by changing the php version that i'm using inside terminal.



enviroment: debian9, apache 2.4



Any help? thanks!!!









share|improve this question











share|improve this question




share|improve this question










asked Oct 30 '17 at 15:14









Braian Mellor

1184




1184











  • Can you post the output of type php?
    – datUser
    Oct 30 '17 at 15:56










  • php is /usr/local/bin/php
    – Braian Mellor
    Oct 30 '17 at 15:59
















  • Can you post the output of type php?
    – datUser
    Oct 30 '17 at 15:56










  • php is /usr/local/bin/php
    – Braian Mellor
    Oct 30 '17 at 15:59















Can you post the output of type php?
– datUser
Oct 30 '17 at 15:56




Can you post the output of type php?
– datUser
Oct 30 '17 at 15:56












php is /usr/local/bin/php
– Braian Mellor
Oct 30 '17 at 15:59




php is /usr/local/bin/php
– Braian Mellor
Oct 30 '17 at 15:59










2 Answers
2






active

oldest

votes

















up vote
0
down vote













I solve it like this



# type php
php is /usr/local/bin/php
# cd /usr/local/bin/php
# sudo mv php phpbak
# type php
php is /usr/bin/php
# php -v
PHP 7.1.11-1


Hope this helps someone else






share|improve this answer




















  • You're asking for a world of pain down the road. shrug
    – Satō Katsura
    Oct 30 '17 at 16:13

















up vote
0
down vote













Use alternatives for this, this way you can control and move between versions and configs as needed:
https://wiki.debian.org/DebianAlternatives



Once configured the change is as easy as:



sudo update-alternatives --set php $path to PHP executable






share|improve this answer




















    Your Answer







    StackExchange.ready(function()
    var channelOptions =
    tags: "".split(" "),
    id: "106"
    ;
    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: false,
    noModals: false,
    showLowRepImageUploadWarning: true,
    reputationToPostImages: null,
    bindNavPrevention: true,
    postfix: "",
    onDemand: true,
    discardSelector: ".discard-answer"
    ,immediatelyShowMarkdownHelp:true
    );



    );













     

    draft saved


    draft discarded


















    StackExchange.ready(
    function ()
    StackExchange.openid.initPostLogin('.new-post-login', 'https%3a%2f%2funix.stackexchange.com%2fquestions%2f401421%2fproblem-with-2-php-version-and-openssl%23new-answer', 'question_page');

    );

    Post as a guest






























    2 Answers
    2






    active

    oldest

    votes








    2 Answers
    2






    active

    oldest

    votes









    active

    oldest

    votes






    active

    oldest

    votes








    up vote
    0
    down vote













    I solve it like this



    # type php
    php is /usr/local/bin/php
    # cd /usr/local/bin/php
    # sudo mv php phpbak
    # type php
    php is /usr/bin/php
    # php -v
    PHP 7.1.11-1


    Hope this helps someone else






    share|improve this answer




















    • You're asking for a world of pain down the road. shrug
      – Satō Katsura
      Oct 30 '17 at 16:13














    up vote
    0
    down vote













    I solve it like this



    # type php
    php is /usr/local/bin/php
    # cd /usr/local/bin/php
    # sudo mv php phpbak
    # type php
    php is /usr/bin/php
    # php -v
    PHP 7.1.11-1


    Hope this helps someone else






    share|improve this answer




















    • You're asking for a world of pain down the road. shrug
      – Satō Katsura
      Oct 30 '17 at 16:13












    up vote
    0
    down vote










    up vote
    0
    down vote









    I solve it like this



    # type php
    php is /usr/local/bin/php
    # cd /usr/local/bin/php
    # sudo mv php phpbak
    # type php
    php is /usr/bin/php
    # php -v
    PHP 7.1.11-1


    Hope this helps someone else






    share|improve this answer












    I solve it like this



    # type php
    php is /usr/local/bin/php
    # cd /usr/local/bin/php
    # sudo mv php phpbak
    # type php
    php is /usr/bin/php
    # php -v
    PHP 7.1.11-1


    Hope this helps someone else







    share|improve this answer












    share|improve this answer



    share|improve this answer










    answered Oct 30 '17 at 16:01









    Braian Mellor

    1184




    1184











    • You're asking for a world of pain down the road. shrug
      – Satō Katsura
      Oct 30 '17 at 16:13
















    • You're asking for a world of pain down the road. shrug
      – Satō Katsura
      Oct 30 '17 at 16:13















    You're asking for a world of pain down the road. shrug
    – Satō Katsura
    Oct 30 '17 at 16:13




    You're asking for a world of pain down the road. shrug
    – Satō Katsura
    Oct 30 '17 at 16:13












    up vote
    0
    down vote













    Use alternatives for this, this way you can control and move between versions and configs as needed:
    https://wiki.debian.org/DebianAlternatives



    Once configured the change is as easy as:



    sudo update-alternatives --set php $path to PHP executable






    share|improve this answer
























      up vote
      0
      down vote













      Use alternatives for this, this way you can control and move between versions and configs as needed:
      https://wiki.debian.org/DebianAlternatives



      Once configured the change is as easy as:



      sudo update-alternatives --set php $path to PHP executable






      share|improve this answer






















        up vote
        0
        down vote










        up vote
        0
        down vote









        Use alternatives for this, this way you can control and move between versions and configs as needed:
        https://wiki.debian.org/DebianAlternatives



        Once configured the change is as easy as:



        sudo update-alternatives --set php $path to PHP executable






        share|improve this answer












        Use alternatives for this, this way you can control and move between versions and configs as needed:
        https://wiki.debian.org/DebianAlternatives



        Once configured the change is as easy as:



        sudo update-alternatives --set php $path to PHP executable







        share|improve this answer












        share|improve this answer



        share|improve this answer










        answered Oct 31 '17 at 22:11









        Kramer

        1376




        1376



























             

            draft saved


            draft discarded















































             


            draft saved


            draft discarded














            StackExchange.ready(
            function ()
            StackExchange.openid.initPostLogin('.new-post-login', 'https%3a%2f%2funix.stackexchange.com%2fquestions%2f401421%2fproblem-with-2-php-version-and-openssl%23new-answer', 'question_page');

            );

            Post as a guest













































































            Popular posts from this blog

            Peggy Mitchell

            The Forum (Inglewood, California)

            Palaiologos