Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

What are the .ini files in /etc/php5/conf.d folder for?

I get that the .ini files in /etc/php5/cli have to do with CLI usage of PHP, the files in /etc/php5/fpm are about FastCGI/FPM aspect of PHP, but what about the .ini files located in /etc/php5/conf.d?

like image 979
Desmond Hume Avatar asked Nov 14 '12 17:11

Desmond Hume


People also ask

What purpose does a .ini file serve?

This format was used for operating system components, such as device drivers, fonts, and startup launchers. INI files were also generally used by applications to store individual settings. The format was maintained in 16-bit Microsoft Windows platforms up through Windows 3.1x.

What is the purpose of PHP ini file?

The php. ini file is the default configuration file for running applications that require PHP. It is used to control variables such as upload sizes, file timeouts, and resource limits.

How do I view .INI files?

How to Open and Edit INI Files. It's not a common practice for people to open or edit INI files, but they can be opened and changed with any text editor. Just double-clicking it will automatically open it in the Notepad application in Windows.


1 Answers

Those files will overwrite the settings in php.ini. Putting config stuff here allows you to have custom settings while keeping updates simpler: if you modify php.ini itself then you either have to retain the old php.ini or overwrite it when you update PHP. If you keep your custom settings in, eg. conf.d/local.ini then you can update PHP easily while retaining any environment-specific settings.

(Credit due to this blog post)

like image 76
Nick F Avatar answered Sep 27 '22 18:09

Nick F