ini

How do I escape a new line character in a .ini file so that Zend_Config_Ini reads it literally?

I am trying to store a multiple line e-mail in an ini file using PHP/Zend Framework. My string has new lines characters in it, and when I use Zend_Config_Ini to parse the ini file, the new line characters come back escaped, so they are printed out on screen, instead of a line feed. Example: // ini file message = Hi {0},\n\nThis is a te...

PHP: Set max_file_uploads for one file rather than php.ini

Like many variables in PHP using ini_set() on a page doesn't actually work. I've recently upgraded my PHP version and found that my multiple image uploader is now capped. After 3 hours of frustration, I've found that my new PHP install has the new "max_file_uploads" parameter set to "20". So only the first 7 images get uploaded (each i...

Including variables inside curly braces in a Zend config ini file on Linux

I am trying to include a variable in a .ini file setting by surrounding it with curly braces, and Zend is complaining that it cannot parse it properly on Linux. It works properly on Windows, though: welcome_message = Welcome, {0}. This is the error that is being thrown on Linux: : Uncaught exception 'Zend_Config_Exception' with mess...

Read ini from windows batch file

I'm trying to read a ini file with this format: [SectionName] total=4 [AnotherSectionName] total=7 [OtherSectionName] total=12 Basically I want to echo out certain values from the ini file(eg. the total under OtherSectionName followed by the total from AnotherSectionName). ...

MySQL Config File for Large System

We are running MySQL on a Windows 2003 Server Enterpise Edition box. MySQL is about the only program running on the box. We have approx. 8 slaves replicated to it, but my understanding is that having multiple slaves connecting to the same master does not significantly slow down performance, if at all. The master server has 16G RAM, 10...

configuration file editor in Eclipse

Greetings, Anybody uses Eclipse to edit configuration files like httpd.conf and the likes, or even shell scripts? Which editors are there for that? Thanks. Pedro. ...

Creating a "two way" configuration file

Hello everybody, I am writing a PHP application targeted at non-geeks, non-programmers. I need to create an option page with a bunch of "options" and then store those options...somewhere. Using a database application (MySQL/PostgreSQL/SQLite) is out of the question because it will require more configuration than the user needs to do (I ...

I have written custom classes for IIS, v 6.X , and they don't seem to be working

I have written a couple of custom php classes that are deployed to IIS servers. They work fine on the development box but not on the staging server. I don't have much experience with IIS and am not sure if it's a config issue with IIS or a something to do with the php.ini file. Any hints would be appreciated. Sorry for being vague. ...

get_file_contents not working on my server

I tested this script on another server and it worked fine. Do I have to set my php.ini file? And how? <?php ini_set('allow_url_fopen', 1); if (!isset($_GET['url'])) { exit(); } echo file_get_contents($_GET['url']); ?> ...

WriteProfileString and ReadProfileString functions

Is there a WriteProfileString support directly in C#? I do not want to use the unmanaged function from kernel32.dll. ...

Parsing an "advanced" INI file with PHP

Basically, I would like a simple, easy, one-file way to parse an INI file with "advanced" features, like section inheritance and property nesting, like Zend_Config_Ini. For example: [foo] a = 1 b.a = 2 b.b = 3 b.c = 4 c = 5 [bar : foo] b.b = 17 c = 42 Would parse into array( 'foo'=>array( 'a'=>'1', 'b'=>array( 'a'=>...

Edit ini file option values with ConfigParser (Python)

Anyone know how'd I'd go about editing ini file values preferably using ConfigParser? (Or even a place to start from would be great!) I've got lots of comments throughout my config file so I'd like to keep them by just editing the values, not taking the values and playing around with multiple files. Structure of my config file: [name1]...

PHP ini file_get_contents external url

I use following PHP function: file_get_contents('http://example.com'); Whenever I do this on a certain server, the result is empty. When I do it anywhere else, the result is whatever the page's content may be. When I however, on the server where the result is empty, use the function locally - without accessing an external URL (file_get...

Batch file to read ini

I am trying to automate editing the boot.ini depending on the partition XP loads from. This is a snippet of the batch I am working on. One minute it works and the next it fails. It doesn't always correctly read from the boot.ini Any suggestions ? @echo off find "multi(0)disk(0)rdisk(0)partition(1)\WINDOWS" boot.ini | sort /r | date ...

PHP ini file and session deletion

Hi, Posted a question about an error I was getting the over day about Memory exceed when handling an image resize. Managed to solve the problem with a local php.ini file and setting [PHP] upload_max_filesize = 5M post_max_size = 5M memory_limit = 64M Now I realised I have a whole new problem :) If I access a php file in the direct...

Zend Framework problem with Zend_Form_Element_File in a .ini form

The Zend_Form_File is generating an error: Warning: Exception caught by form: Method getImageValue does not exist Stack Trace: #0 /var/www/vhosts/mp3.al/library/Zend/Form/Decorator/Image.php(137): Zend_Form_Element->__call('getImageValue', Array) #1 /var/www/vhosts/mydomain.al/library/Zend/Form/Decorator/Image.php(137): Zend_Form_Elemen...

Parsing INI-like configuration files.

I'm writing an INI-like configuration file and I want to know the best way to parse it in C/C++. I'm writing it on POSIX, so I'll be using # instead of ;. Which doesn't matter. I just want to know, is there some kind of tutorial, article on parsing things or something. ...

get list of sections from ini-file using bash (sed/awk)

I want to create a var from the section names of an ini file like: [foo] ; ... [bar] ; ... [baz:bar] ;... now I need a var like SECTIONS="foo bar baz" thanks in advance ...

How come when I use the tComment VIM plugin in a .ini file it adds/removes semi-colons instead of hashes as comment?

I am using gVIM and the tComment plug-in during editing the development.ini file in a Pylons/Python project. The default development.ini file has lines commented out using the hash # symbol which is the standard method of commenting out lines in Python. However, when I try to uncomment lines by using a tComment keyboard shortcut in gVIM,...

Qsettings - where is the location of the ini file?

hi, I'm using Qsettings to store some data as ini file in windows. I want to see the ini file - but I don't know what is the location of the ini file. this is my code: QSettings *set = new QSettings(QSettings::IniFormat, QSettings::UserScope, "bbb", "aaa"); set->setValue("size", size()); set->setValue("pos", pos...