Questions tagged [ini]

The INI file format includes text-based initialization information for programs. Its structure is composed of "sections" and "properties".

INI is a file format for saving configurations. They are basic text files with a specified format. An INI file contains key/value pairs, which are divided into sections. For example, an INI file for a mobile phone OS could look like this.

[graphics]
login_screen=mountains
desktop_back=earth_from_space
look_and_feel=classic_layout

[securite]
enable_password = true
;should a password be required to unlock the phone
password_on_unlock = true 
password = AC4d201cxDAc30F5AC4d201cxDAc30F5

A section name is put between square brackets. Each line after the section title contains a key/value pair, separated by an equals sign (=). Lines starting with a semicolon are comments.

The INI file format is not well defined, many implementations handle INI files differently. Some ignore whitespaces in key or value names, while some don't. Some implementations allow for the number sign (#) for comments, while some others don't.

1553 questions
274
votes
16 answers

Reading/writing an INI file

Is there any class in the .NET framework that can read/write standard .ini files: [Section] = ... Delphi has the TIniFile component and I want to know if there is anything similar for C#?
zendar
  • 12,766
  • 13
  • 55
  • 75
226
votes
4 answers

How to increase maximum execution time in php

I want to increase maximum execution time in php , not by changing php.ini file. I want to Increase it from my php file. Is this possible?
Pritesh Mahajan
  • 4,570
  • 6
  • 32
  • 57
135
votes
9 answers

How to read and write INI file with Python3?

I need to read, write and create an INI file with Python3. FILE.INI default_path = "/path/name/" default_file = "file.txt" Python File: # Read file and and create if it not exists config = iniFile( 'FILE.INI' ) # Get…
Jorge Olaf
  • 4,810
  • 8
  • 35
  • 70
126
votes
6 answers

Python: How would you save a simple settings/config file?

I don't care if it's JSON, pickle, YAML, or whatever. All other implementations I have seen are not forwards compatible, so if I have a config file, add a new key in the code, then load that config file, it'll just crash. Are there any simple way to…
user1438098
  • 1,819
  • 2
  • 13
  • 14
110
votes
30 answers

How do I grab an INI value within a shell script?

I have a parameters.ini file, such as: [parameters.ini] database_user = user database_version = 20110611142248 I want to read in and use the database version specified in the parameters.ini file from within a bash shell script so I can…
Stephen Watkins
  • 23,077
  • 12
  • 60
  • 97
107
votes
12 answers

What is the easiest way to parse an INI file in Java?

I am writing a drop-in replacement for a legacy application in Java. One of the requirements is that the ini files that the older application used have to be read as-is into the new Java Application. The format of this ini files is the common…
Mario Ortegón
  • 17,860
  • 17
  • 67
  • 79
99
votes
4 answers

Do standard windows .ini files allow comments?

Are comments allowed in Windows ini files? (...assuming you're using the GetPrivateProfileString api functions to read them...) [Section] Name=Value ; comment ; full line comment And, is there a proper spec of the .INI file format anywhere?…
Roddy
  • 63,052
  • 38
  • 156
  • 264
90
votes
13 answers

What is the easiest way to parse an INI File in C++?

I'm trying to parse an INI file using C++. Any tips on what is the best way to achieve this? Should I use the Windows API tools for INI file processing (with which I am totally unfamiliar), an open-source solution or attempt to parse it manually?
conmulligan
  • 6,849
  • 6
  • 28
  • 44
89
votes
18 answers

How to locate the php.ini file (xampp)

I am using xamppserver for PHP development and want to edit the php.ini file; where can I locate it?
Navane
  • 1,208
  • 1
  • 10
  • 24
80
votes
18 answers

PHP Warning: Module already loaded in Unknown on line 0

On Mac OSX Mavericks using homebrew php55 whenever I run a a php command I get the following error message (everything runs fine it's just annoying) PHP Warning: Module 'intl' already loaded in Unknown on line 0 I ran php --ini and the output…
Drew Landgrave
  • 1,195
  • 2
  • 11
  • 22
65
votes
4 answers

How to parse ini file with Boost

I have a ini file which contains some sample values like: [Section1] Value1 = 10 Value2 = a_text_string I'm trying to load these values and print them in my application with Boost but I don't understand how to do this in C++. I searched in this…
Marcus Barnet
  • 1,929
  • 6
  • 27
  • 30
53
votes
13 answers

Registry vs. INI file for storing user configurable application settings

I'm a new Windows programmer and I'm not sure where I should store user configurable application settings. I understand the need to provide a user friendly means for the user to change application settings, like an Edit | Settings form or similar. …
Kurt W. Leucht
  • 4,529
  • 8
  • 30
  • 45
50
votes
10 answers

parsing .properties file in Python

The ConfigParser module raises an exception if one parses a simple Java-style .properties file, whose content is key-value pairs (i..e without INI-style section headers). Is there some workaround?
tshepang
  • 10,772
  • 21
  • 84
  • 127
49
votes
13 answers

PHP | "The requested PHP extension bcmath is missing from your system."

Greetings fellow developers, I am trying to use composer for a PHP project of mine on a development server I recently booted up and for some reason I am unable to. I successfully installed composer, however, when I try to run the require command I…
Coelho
  • 491
  • 1
  • 4
  • 3
47
votes
5 answers

Is it possible to add comments to eclipse.ini file

I wanted to comment some custom parameters I am using now, to remember why they are there the next time I edit it. But I cannot find any reference to comments in this file. Only this, but it is pretty old and hopefully there is a way to add comments…
Persimmonium
  • 15,150
  • 11
  • 43
  • 76
1
2 3
99 100