Chapter 1: Configuring PHP
In This Chapter
Understanding the php.ini
Understanding common changes in the php.ini
When PHP is installed, certain default settings are selected. These settings are based on widely used common values. For instance, the default PHP settings might display errors to the screen depending on the system. There are times when you might need to change these settings. To do so, you use the configuration file called php.ini
. This chapter looks at the php.ini
in more detail and shows some of the common configuration changes that you might perform on your system.
Understanding the php.ini
As discussed in Book I, Chapter 3, the behavior of PHP is controlled through an initialization file called php.ini
. Settings such as how sessions are handled, how errors are displayed, and what modules are available are all controlled through the php.ini
file.
The actual location of the php.ini
file varies depending on the operating system and how PHP was installed. Refer to Book I, Chapter 3, for information on locating the php.ini
or search your system for the file.
Working with the php.ini
The php.ini
file is a plain text file and should be edited with a plain text editor such as Notepad, Textpad, or Vi.