1
votes

I'm on Ubuntu 11.10 with lampp installed and working correctly. Since I couldn't install xDebug as PHP module for use in Eclipse I searched a bit and stumbled upon two different php.ini files. One is located in /etc/php5/cli, and the other one in /opt/lampp/etc. a call to PHP's phpinfo() says that it loaded config file from /opt/lampp/etc, but when I run "php --ini" it says that loaded one is from /etc/php5/cli. Do I need to uninstall the one from /etc?

1

1 Answers

0
votes

The cli in /etc/php5/cli stands for Command Line Interface, so it uses that php.ini file when you're invoking php from the command line.

The php.ini in /opt/lampp/etc is the one that lampp installed and, as you noticed, is the one that apache uses for web requests. (For those not using a lampp package, you'll likely see apache's php.ini in /etc/php5/apache2/)

PHP does act a little differently in each environment, which is why the two config files are necessary. See here for more info there.

If you never use php from the command line (don't forget about cron jobs!) then you can ignore the one in /etc/php/cli, but no you shouldn't uninstall either.