cli php.ini and web phpinfo() not pointed











up vote
0
down vote

favorite












li php.ini and web phpinfo() not pointed



After setting up LAMP in centos I tried



php -i | grep "Loaded Configuration File"
Loaded Configuration File => /usr/local/lib/php.ini


But on web



<?php phpinfo(); ?>

Loaded Configuration File (none)


my web shows openssl is enabled but php cli shows its disabled.



enter image description here










share|improve this question
























  • You are missing configuring your server. You are the administrator of the server, you are supposed to administer it. In the specific case of the question, you are supposed to provide initialization files for the various PHP SAPIs. You must understand how the web server runs PHP in order to execute that phpinfo() call; you are supposed to examine the configuration files for the selected mechanism, and edit them according to the specific situation.
    – AlexP
    Nov 15 '17 at 14:18












  • The CLI and web are using two different php.ini files (/usr/local/lib/php.ini vs /usr/local/php7/lib/php.ini), and quite possible different versions of php as well.
    – user4556274
    Nov 15 '17 at 14:28










  • But there is no php.ini file in /usr/local/php7/lib/ if I add them how do I point to appache to use /usr/local/php7/lib/ instead of /usr/local/lib
    – fernandus
    Nov 15 '17 at 14:45












  • created a php.ini to /usr/local/php7/lib/ it pointed to web phpinfo(), How do I tell CLI to point to /usr/local/php7/lib/php.ini
    – fernandus
    Nov 15 '17 at 16:53










  • I this I got it wrongly, Does it work by pointing, What do I need to do.
    – fernandus
    Nov 15 '17 at 17:17















up vote
0
down vote

favorite












li php.ini and web phpinfo() not pointed



After setting up LAMP in centos I tried



php -i | grep "Loaded Configuration File"
Loaded Configuration File => /usr/local/lib/php.ini


But on web



<?php phpinfo(); ?>

Loaded Configuration File (none)


my web shows openssl is enabled but php cli shows its disabled.



enter image description here










share|improve this question
























  • You are missing configuring your server. You are the administrator of the server, you are supposed to administer it. In the specific case of the question, you are supposed to provide initialization files for the various PHP SAPIs. You must understand how the web server runs PHP in order to execute that phpinfo() call; you are supposed to examine the configuration files for the selected mechanism, and edit them according to the specific situation.
    – AlexP
    Nov 15 '17 at 14:18












  • The CLI and web are using two different php.ini files (/usr/local/lib/php.ini vs /usr/local/php7/lib/php.ini), and quite possible different versions of php as well.
    – user4556274
    Nov 15 '17 at 14:28










  • But there is no php.ini file in /usr/local/php7/lib/ if I add them how do I point to appache to use /usr/local/php7/lib/ instead of /usr/local/lib
    – fernandus
    Nov 15 '17 at 14:45












  • created a php.ini to /usr/local/php7/lib/ it pointed to web phpinfo(), How do I tell CLI to point to /usr/local/php7/lib/php.ini
    – fernandus
    Nov 15 '17 at 16:53










  • I this I got it wrongly, Does it work by pointing, What do I need to do.
    – fernandus
    Nov 15 '17 at 17:17













up vote
0
down vote

favorite









up vote
0
down vote

favorite











li php.ini and web phpinfo() not pointed



After setting up LAMP in centos I tried



php -i | grep "Loaded Configuration File"
Loaded Configuration File => /usr/local/lib/php.ini


But on web



<?php phpinfo(); ?>

Loaded Configuration File (none)


my web shows openssl is enabled but php cli shows its disabled.



enter image description here










share|improve this question















li php.ini and web phpinfo() not pointed



After setting up LAMP in centos I tried



php -i | grep "Loaded Configuration File"
Loaded Configuration File => /usr/local/lib/php.ini


But on web



<?php phpinfo(); ?>

Loaded Configuration File (none)


my web shows openssl is enabled but php cli shows its disabled.



enter image description here







linux centos php php7






share|improve this question















share|improve this question













share|improve this question




share|improve this question








edited Nov 25 at 22:35









Rui F Ribeiro

38.3k1475127




38.3k1475127










asked Nov 15 '17 at 14:09









fernandus

64




64












  • You are missing configuring your server. You are the administrator of the server, you are supposed to administer it. In the specific case of the question, you are supposed to provide initialization files for the various PHP SAPIs. You must understand how the web server runs PHP in order to execute that phpinfo() call; you are supposed to examine the configuration files for the selected mechanism, and edit them according to the specific situation.
    – AlexP
    Nov 15 '17 at 14:18












  • The CLI and web are using two different php.ini files (/usr/local/lib/php.ini vs /usr/local/php7/lib/php.ini), and quite possible different versions of php as well.
    – user4556274
    Nov 15 '17 at 14:28










  • But there is no php.ini file in /usr/local/php7/lib/ if I add them how do I point to appache to use /usr/local/php7/lib/ instead of /usr/local/lib
    – fernandus
    Nov 15 '17 at 14:45












  • created a php.ini to /usr/local/php7/lib/ it pointed to web phpinfo(), How do I tell CLI to point to /usr/local/php7/lib/php.ini
    – fernandus
    Nov 15 '17 at 16:53










  • I this I got it wrongly, Does it work by pointing, What do I need to do.
    – fernandus
    Nov 15 '17 at 17:17


















  • You are missing configuring your server. You are the administrator of the server, you are supposed to administer it. In the specific case of the question, you are supposed to provide initialization files for the various PHP SAPIs. You must understand how the web server runs PHP in order to execute that phpinfo() call; you are supposed to examine the configuration files for the selected mechanism, and edit them according to the specific situation.
    – AlexP
    Nov 15 '17 at 14:18












  • The CLI and web are using two different php.ini files (/usr/local/lib/php.ini vs /usr/local/php7/lib/php.ini), and quite possible different versions of php as well.
    – user4556274
    Nov 15 '17 at 14:28










  • But there is no php.ini file in /usr/local/php7/lib/ if I add them how do I point to appache to use /usr/local/php7/lib/ instead of /usr/local/lib
    – fernandus
    Nov 15 '17 at 14:45












  • created a php.ini to /usr/local/php7/lib/ it pointed to web phpinfo(), How do I tell CLI to point to /usr/local/php7/lib/php.ini
    – fernandus
    Nov 15 '17 at 16:53










  • I this I got it wrongly, Does it work by pointing, What do I need to do.
    – fernandus
    Nov 15 '17 at 17:17
















You are missing configuring your server. You are the administrator of the server, you are supposed to administer it. In the specific case of the question, you are supposed to provide initialization files for the various PHP SAPIs. You must understand how the web server runs PHP in order to execute that phpinfo() call; you are supposed to examine the configuration files for the selected mechanism, and edit them according to the specific situation.
– AlexP
Nov 15 '17 at 14:18






You are missing configuring your server. You are the administrator of the server, you are supposed to administer it. In the specific case of the question, you are supposed to provide initialization files for the various PHP SAPIs. You must understand how the web server runs PHP in order to execute that phpinfo() call; you are supposed to examine the configuration files for the selected mechanism, and edit them according to the specific situation.
– AlexP
Nov 15 '17 at 14:18














The CLI and web are using two different php.ini files (/usr/local/lib/php.ini vs /usr/local/php7/lib/php.ini), and quite possible different versions of php as well.
– user4556274
Nov 15 '17 at 14:28




The CLI and web are using two different php.ini files (/usr/local/lib/php.ini vs /usr/local/php7/lib/php.ini), and quite possible different versions of php as well.
– user4556274
Nov 15 '17 at 14:28












But there is no php.ini file in /usr/local/php7/lib/ if I add them how do I point to appache to use /usr/local/php7/lib/ instead of /usr/local/lib
– fernandus
Nov 15 '17 at 14:45






But there is no php.ini file in /usr/local/php7/lib/ if I add them how do I point to appache to use /usr/local/php7/lib/ instead of /usr/local/lib
– fernandus
Nov 15 '17 at 14:45














created a php.ini to /usr/local/php7/lib/ it pointed to web phpinfo(), How do I tell CLI to point to /usr/local/php7/lib/php.ini
– fernandus
Nov 15 '17 at 16:53




created a php.ini to /usr/local/php7/lib/ it pointed to web phpinfo(), How do I tell CLI to point to /usr/local/php7/lib/php.ini
– fernandus
Nov 15 '17 at 16:53












I this I got it wrongly, Does it work by pointing, What do I need to do.
– fernandus
Nov 15 '17 at 17:17




I this I got it wrongly, Does it work by pointing, What do I need to do.
– fernandus
Nov 15 '17 at 17:17










1 Answer
1






active

oldest

votes

















up vote
0
down vote













I started to use what I have in my PHP.ini file



I have installed two Version of php one to the default path and other to /usr/local/php7/bin/php



Since I am using Magento I cant run setup:upgrade with




/php bin/magento setup:upgrade




I just pointed it to config path which I have in my php.ini




/usr/local/php7/bin/php bin/magento setup:upgrade







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: true,
    showLowRepImageUploadWarning: true,
    reputationToPostImages: null,
    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%2funix.stackexchange.com%2fquestions%2f404739%2fcli-php-ini-and-web-phpinfo-not-pointed%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













    I started to use what I have in my PHP.ini file



    I have installed two Version of php one to the default path and other to /usr/local/php7/bin/php



    Since I am using Magento I cant run setup:upgrade with




    /php bin/magento setup:upgrade




    I just pointed it to config path which I have in my php.ini




    /usr/local/php7/bin/php bin/magento setup:upgrade







    share|improve this answer

























      up vote
      0
      down vote













      I started to use what I have in my PHP.ini file



      I have installed two Version of php one to the default path and other to /usr/local/php7/bin/php



      Since I am using Magento I cant run setup:upgrade with




      /php bin/magento setup:upgrade




      I just pointed it to config path which I have in my php.ini




      /usr/local/php7/bin/php bin/magento setup:upgrade







      share|improve this answer























        up vote
        0
        down vote










        up vote
        0
        down vote









        I started to use what I have in my PHP.ini file



        I have installed two Version of php one to the default path and other to /usr/local/php7/bin/php



        Since I am using Magento I cant run setup:upgrade with




        /php bin/magento setup:upgrade




        I just pointed it to config path which I have in my php.ini




        /usr/local/php7/bin/php bin/magento setup:upgrade







        share|improve this answer












        I started to use what I have in my PHP.ini file



        I have installed two Version of php one to the default path and other to /usr/local/php7/bin/php



        Since I am using Magento I cant run setup:upgrade with




        /php bin/magento setup:upgrade




        I just pointed it to config path which I have in my php.ini




        /usr/local/php7/bin/php bin/magento setup:upgrade








        share|improve this answer












        share|improve this answer



        share|improve this answer










        answered Nov 26 at 7:49









        fernandus

        64




        64






























            draft saved

            draft discarded




















































            Thanks for contributing an answer to Unix & Linux Stack Exchange!


            • 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.





            Some of your past answers have not been well-received, and you're in danger of being blocked from answering.


            Please pay close attention to the following guidance:


            • 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%2funix.stackexchange.com%2fquestions%2f404739%2fcli-php-ini-and-web-phpinfo-not-pointed%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

            サソリ

            広島県道265号伴広島線

            Setup Asymptote in Texstudio