The PHP scripting language was first introduced in 1995 and quickly became one of the most popular scripting languages, now a base of tons of scripts. Without PHP, the creation of a forum, blog or an image gallery would not have been such an easy task. Its ability to easily interact with databases, such as MySQL and PostgreSQL, makes it even more popular among developers. However, the PHP language would have never gained so much popularity if it was not for its easy innate configuration via the php.ini file.
The php.ini fileThe php.ini is the main PHP configuration file. It allows the user to define some of the settings for the PHP interpreter. With it, you can enable or disable some directives, such as "register_globals", enable the access and error logs, or change the default upload folder for files uploaded via a PHP script. Changes in the php.ini file are usually updated within 10 to 30 minutes, depending of the server configuration.
The php.ini file hierarchy
The presence of a main sever php.ini file does not mean that all changes will have to be made there. The PHP interpreter is configured to look for the php.ini file first in the folder where the script is being executed. This way, all end customers can have their own php.ini file, without the need of server modifications. Here is where the PHP interpreter looks for the php.ini file:
- The directory from which the PHP script was called
- Your main web directory (typically public_html/ or www/)
- The web server's default php.ini
The php.ini file with NTC Hosting
Each of the web hosting plans offered by NTC Hosting comes with a completely editable php.ini file - a part of our efforts to provide a first class PHP hosting solution to everybody. The php.ini file is located in the sys/ folder, accessible via the advanced file manager in our Control Panel. In the file, there are detailed explanations what the directives inside it are for and how to enable, disable or modify them. Our servers, running on the stable combo of Linux and Apache, are configured to check for the updates of the php.ini file every 10 minutes to ensure that all updates will be propagated as fast as possible.