Which php.ini is used on my system?
.everyoneloves__top-leaderboard:empty,.everyoneloves__mid-leaderboard:empty,.everyoneloves__bot-mid-leaderboard:empty{ margin-bottom:0;
}
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
add a comment |
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
add a comment |
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
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
magento2 php php-7
edited Mar 10 at 15:16
guaka
15810
15810
asked Mar 4 at 9:52
DespotarsDespotars
1807
1807
add a comment |
add a comment |
2 Answers
2
active
oldest
votes
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 a PHP file which gets served 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 runningphp -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)
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
Mar 4 at 18:02
1
There are some cases where you don't need to have the exact information in both of the files (like memory allocation for example), but more often than not, you want to edit both files.
– Dan
Mar 5 at 0:09
add a comment |
check phpinfo();
you will see "Configuration File (php.ini) Path" in info list, this is where you find php.ini file path
Yes but when I created the fie, I have this error: 404 error: Page not found php
– Despotars
Mar 4 at 10:25
1
This is because of your magento .htaccess file. For testing purpose, you need to edit your project index file.pub/index.php
and addphpinfo();die;
there on top of the file
– Shoaib Munir
Mar 4 at 10:27
yes! Thank you! :)
– Despotars
Mar 4 at 10:30
1
Welcome..... :)
– Shoaib Munir
Mar 4 at 10:32
add a comment |
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
});
}
});
Sign up or log in
StackExchange.ready(function () {
StackExchange.helpers.onClickDraftSave('#login-link');
});
Sign up using Google
Sign up using Facebook
Sign up using Email and Password
Post as a guest
Required, but never shown
StackExchange.ready(
function () {
StackExchange.openid.initPostLogin('.new-post-login', 'https%3a%2f%2fmagento.stackexchange.com%2fquestions%2f264276%2fwhich-php-ini-is-used-on-my-system%23new-answer', 'question_page');
}
);
Post as a guest
Required, but never shown
2 Answers
2
active
oldest
votes
2 Answers
2
active
oldest
votes
active
oldest
votes
active
oldest
votes
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 a PHP file which gets served 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 runningphp -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)
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
Mar 4 at 18:02
1
There are some cases where you don't need to have the exact information in both of the files (like memory allocation for example), but more often than not, you want to edit both files.
– Dan
Mar 5 at 0:09
add a comment |
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 a PHP file which gets served 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 runningphp -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)
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
Mar 4 at 18:02
1
There are some cases where you don't need to have the exact information in both of the files (like memory allocation for example), but more often than not, you want to edit both files.
– Dan
Mar 5 at 0:09
add a comment |
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 a PHP file which gets served 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 runningphp -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)
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 a PHP file which gets served 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 runningphp -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)
edited Mar 5 at 0:11
answered Mar 4 at 15:54
DanDan
1,111723
1,111723
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
Mar 4 at 18:02
1
There are some cases where you don't need to have the exact information in both of the files (like memory allocation for example), but more often than not, you want to edit both files.
– Dan
Mar 5 at 0:09
add a comment |
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
Mar 4 at 18:02
1
There are some cases where you don't need to have the exact information in both of the files (like memory allocation for example), but more often than not, you want to edit both files.
– Dan
Mar 5 at 0:09
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
Mar 4 at 18:02
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
Mar 4 at 18:02
1
1
There are some cases where you don't need to have the exact information in both of the files (like memory allocation for example), but more often than not, you want to edit both files.
– Dan
Mar 5 at 0:09
There are some cases where you don't need to have the exact information in both of the files (like memory allocation for example), but more often than not, you want to edit both files.
– Dan
Mar 5 at 0:09
add a comment |
check phpinfo();
you will see "Configuration File (php.ini) Path" in info list, this is where you find php.ini file path
Yes but when I created the fie, I have this error: 404 error: Page not found php
– Despotars
Mar 4 at 10:25
1
This is because of your magento .htaccess file. For testing purpose, you need to edit your project index file.pub/index.php
and addphpinfo();die;
there on top of the file
– Shoaib Munir
Mar 4 at 10:27
yes! Thank you! :)
– Despotars
Mar 4 at 10:30
1
Welcome..... :)
– Shoaib Munir
Mar 4 at 10:32
add a comment |
check phpinfo();
you will see "Configuration File (php.ini) Path" in info list, this is where you find php.ini file path
Yes but when I created the fie, I have this error: 404 error: Page not found php
– Despotars
Mar 4 at 10:25
1
This is because of your magento .htaccess file. For testing purpose, you need to edit your project index file.pub/index.php
and addphpinfo();die;
there on top of the file
– Shoaib Munir
Mar 4 at 10:27
yes! Thank you! :)
– Despotars
Mar 4 at 10:30
1
Welcome..... :)
– Shoaib Munir
Mar 4 at 10:32
add a comment |
check phpinfo();
you will see "Configuration File (php.ini) Path" in info list, this is where you find php.ini file path
check phpinfo();
you will see "Configuration File (php.ini) Path" in info list, this is where you find php.ini file path
answered Mar 4 at 10:07
Shoaib MunirShoaib Munir
2,3692829
2,3692829
Yes but when I created the fie, I have this error: 404 error: Page not found php
– Despotars
Mar 4 at 10:25
1
This is because of your magento .htaccess file. For testing purpose, you need to edit your project index file.pub/index.php
and addphpinfo();die;
there on top of the file
– Shoaib Munir
Mar 4 at 10:27
yes! Thank you! :)
– Despotars
Mar 4 at 10:30
1
Welcome..... :)
– Shoaib Munir
Mar 4 at 10:32
add a comment |
Yes but when I created the fie, I have this error: 404 error: Page not found php
– Despotars
Mar 4 at 10:25
1
This is because of your magento .htaccess file. For testing purpose, you need to edit your project index file.pub/index.php
and addphpinfo();die;
there on top of the file
– Shoaib Munir
Mar 4 at 10:27
yes! Thank you! :)
– Despotars
Mar 4 at 10:30
1
Welcome..... :)
– Shoaib Munir
Mar 4 at 10:32
Yes but when I created the fie, I have this error: 404 error: Page not found php
– Despotars
Mar 4 at 10:25
Yes but when I created the fie, I have this error: 404 error: Page not found php
– Despotars
Mar 4 at 10:25
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
Mar 4 at 10:27
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
Mar 4 at 10:27
yes! Thank you! :)
– Despotars
Mar 4 at 10:30
yes! Thank you! :)
– Despotars
Mar 4 at 10:30
1
1
Welcome..... :)
– Shoaib Munir
Mar 4 at 10:32
Welcome..... :)
– Shoaib Munir
Mar 4 at 10:32
add a comment |
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.
Sign up or log in
StackExchange.ready(function () {
StackExchange.helpers.onClickDraftSave('#login-link');
});
Sign up using Google
Sign up using Facebook
Sign up using Email and Password
Post as a guest
Required, but never shown
StackExchange.ready(
function () {
StackExchange.openid.initPostLogin('.new-post-login', 'https%3a%2f%2fmagento.stackexchange.com%2fquestions%2f264276%2fwhich-php-ini-is-used-on-my-system%23new-answer', 'question_page');
}
);
Post as a guest
Required, but never shown
Sign up or log in
StackExchange.ready(function () {
StackExchange.helpers.onClickDraftSave('#login-link');
});
Sign up using Google
Sign up using Facebook
Sign up using Email and Password
Post as a guest
Required, but never shown
Sign up or log in
StackExchange.ready(function () {
StackExchange.helpers.onClickDraftSave('#login-link');
});
Sign up using Google
Sign up using Facebook
Sign up using Email and Password
Post as a guest
Required, but never shown
Sign up or log in
StackExchange.ready(function () {
StackExchange.helpers.onClickDraftSave('#login-link');
});
Sign up using Google
Sign up using Facebook
Sign up using Email and Password
Sign up using Google
Sign up using Facebook
Sign up using Email and Password
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