Why do we have a different php.ini for the php client ?
Is it a good idea to link the main instead ?
$ sudo ln -s /etc/php5/apache2/php.ini /etc/php5/cli/php.ini
Why do we have a different php.ini for the php client ?
Is it a good idea to link the main instead ?
$ sudo ln -s /etc/php5/apache2/php.ini /etc/php5/cli/php.ini
It entirely up to you how you configure your system, based on your needs. However, there are good reasons for having separate configuration files for CLI and Apache, not least because a web server is typically an externally facing service. For example:
Note that you can also configure your PHP installation by adding files to
/etc/php5/conf.d
. This is a good way to keep your customisations in their own file and avoid conflicts in yourphp.ini
file(s) if they get updated by a new version of the packages. The latter point is also an issue if you choose to use symlinks forphp.ini
. Note that theconf.d
directories forcli
andapache
are symlinks.