Configuring PHP via php.ini on Hosting
The PHP engine can be configured
using a special file php.ini.
This file contains various settings
and their values.
There are various ways to change these values:
- You can edit the settings manually by opening the file in an editor. In this case, the settings are applied to all sites.
- You can change the settings via the .htaccess file. In this case, the settings are applied to a specific site.
-
You can change the settings via a special
PHP function
ini_set. In this case, the settings are applied to a specific script.
On hosting, we do not have access to directly edit
the php.ini file. However, the hosting control panel
may have an interface for changing
a limited number of parameters.
Also, the option with
ini_set and the .htaccess file will work on hosting, but also
in a limited way. We will study this
in more detail in the following lessons.
Find out how to open the php.ini file
on your local server (search online).
Open this file for editing and study it.