php.ini

Hi,

I have installed ubuntu server lamp.

When I used the command locate to find the php.ini file I found two location.
/etc/php5/cli/php.ini
/etc/php5/apache2/php.ini

When I want to change the setting of the php, which one of them should I change and why I have this file twice?

The first is for when you want to use PHP from the command line, the second is for when you wish to use PHP in a browser.

fpmurphy, thank you.

When you say browser you mean someone try to access it via the Apache serve?

Am I correct?

Yes, that is what he means.... when you use PHP with Apache web server.

Note that it is not necessary to strictly use "a browser" as it is only necessary to query the web server, and this can be done with web browsers or with command line utilities such as wget, curl, etc.