Why exist in Ubuntu lamp 2 PHP.ini files, and what function they doing?

  1. /etc/PHP5/cli/PHP.ini

  2. /etc/PHP5/apache2/PHP.ini

link|improve this question

feedback

2 Answers

up vote 1 down vote accepted

The first file, /etc/php5/cli/php.ini, is the PHP configuration file (php.ini) for when the console command php is run. The second file, /etc/php5/apache2/php.ini, is the PHP configuration file for when PHP is run as an Apache extension. If you're trying to use a php.ini for your website, use the second location.

link|improve this answer
feedback

PHP can be executed from the command line or from a webserver. /etc/php5/apache2/php.ini is used for the webserver execution, /etc/php5/cli/php.ini is used for the command line execution.

link|improve this answer
beat me to it by 39 seconds D: – squircle Jun 1 '10 at 19:10
Ye I'm so sorry! XD But we're both right! :D – BloodPhilia Jun 1 '10 at 19:11
Thank you very much! – Yosef Jun 1 '10 at 19:56
feedback

Your Answer

 
or
required, but never shown

Not the answer you're looking for? Browse other questions tagged or ask your own question.