Take the 2-minute tour ×
Super User is a question and answer site for computer enthusiasts and power users. It's 100% free, no registration required.

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

share|improve this question
add comment

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.

share|improve this answer
add comment

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.

share|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
add comment

Your Answer

 
discard

By posting your answer, you agree to the privacy policy and terms of service.

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