Changing PHP configuration settings
The PHP interpreter allows you to specify values of numerous settings, which determine how PHP applications behave on your system. This configuration affects how errors are logged or displayed, how input data is handled, what resources are allocated to the interpreter, and settings for extension modules bundled with PHP.
PHP's configuration file is traditionally called php.ini
, and its location depends on your operating system distribution and version of PHP. Common locations of the php.ini
file include: /etc/
, /etc/php5/apache2/
, and /usr/local/etc/
. The php.ini
file contains master setting values, but some settings may be overwritten locally with a PHP script or Apache configuration for a directory.
In this recipe, we will demonstrate how to check values of currently used configuration settings and how they can be modified.
Getting ready
Assuming you already have Apache and PHP installed, prepare a directory that is exposed through the web server and ready...