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.

1656 questions
297
votes
17 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
  • 13,384
  • 14
  • 59
  • 75
247
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,974
  • 8
  • 39
  • 64
196
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…
Olaf Erlandsen
  • 5,817
  • 9
  • 41
  • 73
159
votes
8 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
  • 2,239
  • 3
  • 18
  • 14
136
votes
32 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
  • 25,047
  • 15
  • 66
  • 100
126
votes
6 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…
Roddy
  • 66,617
  • 42
  • 165
  • 277
111
votes
13 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
  • 18,670
  • 17
  • 71
  • 81
107
votes
20 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,515
  • 3
  • 13
  • 23
103
votes
19 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,348
  • 2
  • 12
  • 25
92
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
  • 7,038
  • 6
  • 33
  • 44
68
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
  • 2,083
  • 6
  • 28
  • 36
66
votes
15 answers

"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
  • 661
  • 1
  • 5
  • 3
61
votes
12 answers

Script timeout passed, if you want to finish import, please resubmit the same file and import will resume

I have a database Un-zipped size 50mb zipped size 7mb So when I try to import the database zipped(7mb) after few minutes it is throwing this error: Script timeout passed, if you want to finish import, please resubmit the same file and import…
Mr world wide
  • 4,696
  • 7
  • 43
  • 97
56
votes
4 answers

.ini file load environment variable

I am using Alembic for migrations implementation in a Flask project. There is a alembic.ini file where the database configs must be specified: sqlalchemy.url = driver://user:password@host/dbname Is there a way to specify the parameters from the…
dimmg
  • 3,316
  • 2
  • 20
  • 29
55
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,725
  • 8
  • 33
  • 45
1
2 3
99 100