What php.ini used my system?












1















I'm using Magento 2.3.0 with PHP 7.2.15-0ubuntu0.18.04.1 (cli) (built: Feb 8 2019 14:54:22) ( NTS ), and I'm not sure which is the php.ini file that I should modify. I am currently modifying these two with the same information:




  • /etc/php/7.2/fpm/php.ini

  • /etc/php/7.2/cli/php.ini


But I guess the system only use one of the two, where can I check which of the two files is the one using the system?










share|improve this question



























    1















    I'm using Magento 2.3.0 with PHP 7.2.15-0ubuntu0.18.04.1 (cli) (built: Feb 8 2019 14:54:22) ( NTS ), and I'm not sure which is the php.ini file that I should modify. I am currently modifying these two with the same information:




    • /etc/php/7.2/fpm/php.ini

    • /etc/php/7.2/cli/php.ini


    But I guess the system only use one of the two, where can I check which of the two files is the one using the system?










    share|improve this question

























      1












      1








      1








      I'm using Magento 2.3.0 with PHP 7.2.15-0ubuntu0.18.04.1 (cli) (built: Feb 8 2019 14:54:22) ( NTS ), and I'm not sure which is the php.ini file that I should modify. I am currently modifying these two with the same information:




      • /etc/php/7.2/fpm/php.ini

      • /etc/php/7.2/cli/php.ini


      But I guess the system only use one of the two, where can I check which of the two files is the one using the system?










      share|improve this question














      I'm using Magento 2.3.0 with PHP 7.2.15-0ubuntu0.18.04.1 (cli) (built: Feb 8 2019 14:54:22) ( NTS ), and I'm not sure which is the php.ini file that I should modify. I am currently modifying these two with the same information:




      • /etc/php/7.2/fpm/php.ini

      • /etc/php/7.2/cli/php.ini


      But I guess the system only use one of the two, where can I check which of the two files is the one using the system?







      magento2 php php-7






      share|improve this question













      share|improve this question











      share|improve this question




      share|improve this question










      asked 12 hours ago









      DespotarsDespotars

      1446




      1446






















          3 Answers
          3






          active

          oldest

          votes


















          2














          check phpinfo();



          you will see "Configuration File (php.ini) Path" in info list, this is where you find php.ini file path






          share|improve this answer
























          • Yes but when I created the fie, I have this error: 404 error: Page not found php

            – Despotars
            12 hours ago






          • 1





            This is because of your magento .htaccess file. For testing purpose, you need to edit your project index file. pub/index.php and add phpinfo();die; there on top of the file

            – Shoaib Munir
            12 hours ago











          • yes! Thank you! :)

            – Despotars
            12 hours ago






          • 1





            Welcome..... :)

            – Shoaib Munir
            12 hours ago



















          1














          You can using phpinfo() to view php details.






          share|improve this answer
























          • You can create a phpinfo.php file in your website directory. Add below code to the file. code <?php phpinfo();

            – yoyo
            12 hours ago













          • Yes but when I created the fie, I have this error: 404 error: Page not found php

            – Despotars
            12 hours ago











          • This does not provide an answer to the question. Once you have sufficient reputation you will be able to comment on any post; instead, provide answers that don't require clarification from the asker. - From Review

            – Mohit Kumar Arora
            12 hours ago



















          1














          I want to clarify the difference, as the 2 files are not redundant and you may still need to modify both files in most cases. Especially since some times, we use the command line to run some Magento commands.



          As the other answers mention, running phpinfo() will let you know which php.ini file you would be using. However, the two files exist for two separate purposes.





          • /etc/php/7.2/fpm/php.ini



            This file will be used by your web server. So running phpinfo() in PHP file which gets server by your web browser, will show you this ini file.




          • /etc/php/7.2/cli/php.ini



            This file will be used by the command line (CLI is an acronym for Command-Line Interface). So running commands in the CLI will, in fact, use this ini file and not the other one. It should be possible to verify this by running php -i in the command line (I don't have PHP installed on the OS i'm currently using in order to test the command).




          So as you can see, if for example, you enable an extension in the fpm/php.ini because Magento needs it, you will find that the magento CLI command would fail and complain if you don't also enable that module in the second file as well.
          (It may be a better idea to enable PHP extensions in another way, like php7.2enmod in Ubuntu, but this is just an example)






          share|improve this answer
























          • Thank you very much for your master class! I was going crazy because it is what you say, since the phpinfo () it appeared to me that it used the /fpm/php.ini and from the php --ini it appeared to me that it used the /cli/php.ini. Therefore, it is normal to edit both files with the configuration that Magento needs (the same information in both files), right?

            – Despotars
            4 hours ago











          Your Answer








          StackExchange.ready(function() {
          var channelOptions = {
          tags: "".split(" "),
          id: "479"
          };
          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: 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%2fmagento.stackexchange.com%2fquestions%2f264276%2fwhat-php-ini-used-my-system%23new-answer', 'question_page');
          }
          );

          Post as a guest















          Required, but never shown

























          3 Answers
          3






          active

          oldest

          votes








          3 Answers
          3






          active

          oldest

          votes









          active

          oldest

          votes






          active

          oldest

          votes









          2














          check phpinfo();



          you will see "Configuration File (php.ini) Path" in info list, this is where you find php.ini file path






          share|improve this answer
























          • Yes but when I created the fie, I have this error: 404 error: Page not found php

            – Despotars
            12 hours ago






          • 1





            This is because of your magento .htaccess file. For testing purpose, you need to edit your project index file. pub/index.php and add phpinfo();die; there on top of the file

            – Shoaib Munir
            12 hours ago











          • yes! Thank you! :)

            – Despotars
            12 hours ago






          • 1





            Welcome..... :)

            – Shoaib Munir
            12 hours ago
















          2














          check phpinfo();



          you will see "Configuration File (php.ini) Path" in info list, this is where you find php.ini file path






          share|improve this answer
























          • Yes but when I created the fie, I have this error: 404 error: Page not found php

            – Despotars
            12 hours ago






          • 1





            This is because of your magento .htaccess file. For testing purpose, you need to edit your project index file. pub/index.php and add phpinfo();die; there on top of the file

            – Shoaib Munir
            12 hours ago











          • yes! Thank you! :)

            – Despotars
            12 hours ago






          • 1





            Welcome..... :)

            – Shoaib Munir
            12 hours ago














          2












          2








          2







          check phpinfo();



          you will see "Configuration File (php.ini) Path" in info list, this is where you find php.ini file path






          share|improve this answer













          check phpinfo();



          you will see "Configuration File (php.ini) Path" in info list, this is where you find php.ini file path







          share|improve this answer












          share|improve this answer



          share|improve this answer










          answered 12 hours ago









          Shoaib MunirShoaib Munir

          1,6161526




          1,6161526













          • Yes but when I created the fie, I have this error: 404 error: Page not found php

            – Despotars
            12 hours ago






          • 1





            This is because of your magento .htaccess file. For testing purpose, you need to edit your project index file. pub/index.php and add phpinfo();die; there on top of the file

            – Shoaib Munir
            12 hours ago











          • yes! Thank you! :)

            – Despotars
            12 hours ago






          • 1





            Welcome..... :)

            – Shoaib Munir
            12 hours ago



















          • Yes but when I created the fie, I have this error: 404 error: Page not found php

            – Despotars
            12 hours ago






          • 1





            This is because of your magento .htaccess file. For testing purpose, you need to edit your project index file. pub/index.php and add phpinfo();die; there on top of the file

            – Shoaib Munir
            12 hours ago











          • yes! Thank you! :)

            – Despotars
            12 hours ago






          • 1





            Welcome..... :)

            – Shoaib Munir
            12 hours ago

















          Yes but when I created the fie, I have this error: 404 error: Page not found php

          – Despotars
          12 hours ago





          Yes but when I created the fie, I have this error: 404 error: Page not found php

          – Despotars
          12 hours ago




          1




          1





          This is because of your magento .htaccess file. For testing purpose, you need to edit your project index file. pub/index.php and add phpinfo();die; there on top of the file

          – Shoaib Munir
          12 hours ago





          This is because of your magento .htaccess file. For testing purpose, you need to edit your project index file. pub/index.php and add phpinfo();die; there on top of the file

          – Shoaib Munir
          12 hours ago













          yes! Thank you! :)

          – Despotars
          12 hours ago





          yes! Thank you! :)

          – Despotars
          12 hours ago




          1




          1





          Welcome..... :)

          – Shoaib Munir
          12 hours ago





          Welcome..... :)

          – Shoaib Munir
          12 hours ago













          1














          You can using phpinfo() to view php details.






          share|improve this answer
























          • You can create a phpinfo.php file in your website directory. Add below code to the file. code <?php phpinfo();

            – yoyo
            12 hours ago













          • Yes but when I created the fie, I have this error: 404 error: Page not found php

            – Despotars
            12 hours ago











          • This does not provide an answer to the question. Once you have sufficient reputation you will be able to comment on any post; instead, provide answers that don't require clarification from the asker. - From Review

            – Mohit Kumar Arora
            12 hours ago
















          1














          You can using phpinfo() to view php details.






          share|improve this answer
























          • You can create a phpinfo.php file in your website directory. Add below code to the file. code <?php phpinfo();

            – yoyo
            12 hours ago













          • Yes but when I created the fie, I have this error: 404 error: Page not found php

            – Despotars
            12 hours ago











          • This does not provide an answer to the question. Once you have sufficient reputation you will be able to comment on any post; instead, provide answers that don't require clarification from the asker. - From Review

            – Mohit Kumar Arora
            12 hours ago














          1












          1








          1







          You can using phpinfo() to view php details.






          share|improve this answer













          You can using phpinfo() to view php details.







          share|improve this answer












          share|improve this answer



          share|improve this answer










          answered 12 hours ago









          yoyoyoyo

          244




          244













          • You can create a phpinfo.php file in your website directory. Add below code to the file. code <?php phpinfo();

            – yoyo
            12 hours ago













          • Yes but when I created the fie, I have this error: 404 error: Page not found php

            – Despotars
            12 hours ago











          • This does not provide an answer to the question. Once you have sufficient reputation you will be able to comment on any post; instead, provide answers that don't require clarification from the asker. - From Review

            – Mohit Kumar Arora
            12 hours ago



















          • You can create a phpinfo.php file in your website directory. Add below code to the file. code <?php phpinfo();

            – yoyo
            12 hours ago













          • Yes but when I created the fie, I have this error: 404 error: Page not found php

            – Despotars
            12 hours ago











          • This does not provide an answer to the question. Once you have sufficient reputation you will be able to comment on any post; instead, provide answers that don't require clarification from the asker. - From Review

            – Mohit Kumar Arora
            12 hours ago

















          You can create a phpinfo.php file in your website directory. Add below code to the file. code <?php phpinfo();

          – yoyo
          12 hours ago







          You can create a phpinfo.php file in your website directory. Add below code to the file. code <?php phpinfo();

          – yoyo
          12 hours ago















          Yes but when I created the fie, I have this error: 404 error: Page not found php

          – Despotars
          12 hours ago





          Yes but when I created the fie, I have this error: 404 error: Page not found php

          – Despotars
          12 hours ago













          This does not provide an answer to the question. Once you have sufficient reputation you will be able to comment on any post; instead, provide answers that don't require clarification from the asker. - From Review

          – Mohit Kumar Arora
          12 hours ago





          This does not provide an answer to the question. Once you have sufficient reputation you will be able to comment on any post; instead, provide answers that don't require clarification from the asker. - From Review

          – Mohit Kumar Arora
          12 hours ago











          1














          I want to clarify the difference, as the 2 files are not redundant and you may still need to modify both files in most cases. Especially since some times, we use the command line to run some Magento commands.



          As the other answers mention, running phpinfo() will let you know which php.ini file you would be using. However, the two files exist for two separate purposes.





          • /etc/php/7.2/fpm/php.ini



            This file will be used by your web server. So running phpinfo() in PHP file which gets server by your web browser, will show you this ini file.




          • /etc/php/7.2/cli/php.ini



            This file will be used by the command line (CLI is an acronym for Command-Line Interface). So running commands in the CLI will, in fact, use this ini file and not the other one. It should be possible to verify this by running php -i in the command line (I don't have PHP installed on the OS i'm currently using in order to test the command).




          So as you can see, if for example, you enable an extension in the fpm/php.ini because Magento needs it, you will find that the magento CLI command would fail and complain if you don't also enable that module in the second file as well.
          (It may be a better idea to enable PHP extensions in another way, like php7.2enmod in Ubuntu, but this is just an example)






          share|improve this answer
























          • Thank you very much for your master class! I was going crazy because it is what you say, since the phpinfo () it appeared to me that it used the /fpm/php.ini and from the php --ini it appeared to me that it used the /cli/php.ini. Therefore, it is normal to edit both files with the configuration that Magento needs (the same information in both files), right?

            – Despotars
            4 hours ago
















          1














          I want to clarify the difference, as the 2 files are not redundant and you may still need to modify both files in most cases. Especially since some times, we use the command line to run some Magento commands.



          As the other answers mention, running phpinfo() will let you know which php.ini file you would be using. However, the two files exist for two separate purposes.





          • /etc/php/7.2/fpm/php.ini



            This file will be used by your web server. So running phpinfo() in PHP file which gets server by your web browser, will show you this ini file.




          • /etc/php/7.2/cli/php.ini



            This file will be used by the command line (CLI is an acronym for Command-Line Interface). So running commands in the CLI will, in fact, use this ini file and not the other one. It should be possible to verify this by running php -i in the command line (I don't have PHP installed on the OS i'm currently using in order to test the command).




          So as you can see, if for example, you enable an extension in the fpm/php.ini because Magento needs it, you will find that the magento CLI command would fail and complain if you don't also enable that module in the second file as well.
          (It may be a better idea to enable PHP extensions in another way, like php7.2enmod in Ubuntu, but this is just an example)






          share|improve this answer
























          • Thank you very much for your master class! I was going crazy because it is what you say, since the phpinfo () it appeared to me that it used the /fpm/php.ini and from the php --ini it appeared to me that it used the /cli/php.ini. Therefore, it is normal to edit both files with the configuration that Magento needs (the same information in both files), right?

            – Despotars
            4 hours ago














          1












          1








          1







          I want to clarify the difference, as the 2 files are not redundant and you may still need to modify both files in most cases. Especially since some times, we use the command line to run some Magento commands.



          As the other answers mention, running phpinfo() will let you know which php.ini file you would be using. However, the two files exist for two separate purposes.





          • /etc/php/7.2/fpm/php.ini



            This file will be used by your web server. So running phpinfo() in PHP file which gets server by your web browser, will show you this ini file.




          • /etc/php/7.2/cli/php.ini



            This file will be used by the command line (CLI is an acronym for Command-Line Interface). So running commands in the CLI will, in fact, use this ini file and not the other one. It should be possible to verify this by running php -i in the command line (I don't have PHP installed on the OS i'm currently using in order to test the command).




          So as you can see, if for example, you enable an extension in the fpm/php.ini because Magento needs it, you will find that the magento CLI command would fail and complain if you don't also enable that module in the second file as well.
          (It may be a better idea to enable PHP extensions in another way, like php7.2enmod in Ubuntu, but this is just an example)






          share|improve this answer













          I want to clarify the difference, as the 2 files are not redundant and you may still need to modify both files in most cases. Especially since some times, we use the command line to run some Magento commands.



          As the other answers mention, running phpinfo() will let you know which php.ini file you would be using. However, the two files exist for two separate purposes.





          • /etc/php/7.2/fpm/php.ini



            This file will be used by your web server. So running phpinfo() in PHP file which gets server by your web browser, will show you this ini file.




          • /etc/php/7.2/cli/php.ini



            This file will be used by the command line (CLI is an acronym for Command-Line Interface). So running commands in the CLI will, in fact, use this ini file and not the other one. It should be possible to verify this by running php -i in the command line (I don't have PHP installed on the OS i'm currently using in order to test the command).




          So as you can see, if for example, you enable an extension in the fpm/php.ini because Magento needs it, you will find that the magento CLI command would fail and complain if you don't also enable that module in the second file as well.
          (It may be a better idea to enable PHP extensions in another way, like php7.2enmod in Ubuntu, but this is just an example)







          share|improve this answer












          share|improve this answer



          share|improve this answer










          answered 6 hours ago









          DanDan

          1,076723




          1,076723













          • Thank you very much for your master class! I was going crazy because it is what you say, since the phpinfo () it appeared to me that it used the /fpm/php.ini and from the php --ini it appeared to me that it used the /cli/php.ini. Therefore, it is normal to edit both files with the configuration that Magento needs (the same information in both files), right?

            – Despotars
            4 hours ago



















          • Thank you very much for your master class! I was going crazy because it is what you say, since the phpinfo () it appeared to me that it used the /fpm/php.ini and from the php --ini it appeared to me that it used the /cli/php.ini. Therefore, it is normal to edit both files with the configuration that Magento needs (the same information in both files), right?

            – Despotars
            4 hours ago

















          Thank you very much for your master class! I was going crazy because it is what you say, since the phpinfo () it appeared to me that it used the /fpm/php.ini and from the php --ini it appeared to me that it used the /cli/php.ini. Therefore, it is normal to edit both files with the configuration that Magento needs (the same information in both files), right?

          – Despotars
          4 hours ago





          Thank you very much for your master class! I was going crazy because it is what you say, since the phpinfo () it appeared to me that it used the /fpm/php.ini and from the php --ini it appeared to me that it used the /cli/php.ini. Therefore, it is normal to edit both files with the configuration that Magento needs (the same information in both files), right?

          – Despotars
          4 hours ago


















          draft saved

          draft discarded




















































          Thanks for contributing an answer to Magento 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.




          draft saved


          draft discarded














          StackExchange.ready(
          function () {
          StackExchange.openid.initPostLogin('.new-post-login', 'https%3a%2f%2fmagento.stackexchange.com%2fquestions%2f264276%2fwhat-php-ini-used-my-system%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 to label and detect the document text images

          Vallis Paradisi

          Tabula Rosettana