5.5. Configuring Your Development Environment

Apache, MySQL, and PHP can be configured. Their configuration settings are stored in text files, which you can edit. When XAMPP installs the software, it creates configuration files with default settings so that the software runs with common settings. However, you might need to change the configuration for various reasons. Configuration settings are described throughout the book when the particular feature being configured is discussed.

NOTE

XAMPP installs all the software in the directory you designated during installation, such as c:\xampp, which is the default directory. XAMPP configures the software to look for the configuration files in this directory. If you need to change any configuration settings, you must edit the configuration files in this directory, not in the directories that are mentioned in help files or other documentation for the individual software.

5.5.1. Configuring PHP

PHP uses settings in a file named php.ini to control some of its behavior. PHP looks for php.ini when it begins and uses the settings that it finds. If PHP can't find the file, it uses a set of default settings.

XAMPP stores the php.ini file in the apache\bin directory in the main XAMPP folder. For example, if XAMPP is located in the default directory, you edit the file c:\xampp\apache\bin\php.ini to change PHP configuration settings.

To configure PHP, follow these steps:

  1. Open the php.ini file for editing in a text editor.

  2. Edit the settings you ...

Get PHP & MySQL® Web Development All-in-One Desk Reference for Dummies® now with the O’Reilly learning platform.

O’Reilly members experience books, live events, courses curated by job role, and more from O’Reilly and nearly 200 top publishers.