473,406 Members | 2,816 Online
Bytes | Software Development & Data Engineering Community
Post Job

Home Posts Topics Members FAQ

Join Bytes to post your question to a community of 473,406 software developers and data experts.

illlegal characters for ini file values

Here for instance:
http://de.php.net/manual/en/function.parse-ini-file.php

it says

Characters {}|&~![()" must not be used anywhere in the key and have a special meaning in the value.

but nothing more than that.

To whatever extent that it may be predicted, I want to know what exactly happens if the characters are used, included as a part of a value line.

Is there please an applicable reference page somewhere, or a topic here already to refer to?

My motivation is the possiblity of a creative use if included intelligently.

-- RH.
Oct 11 '06 #1
2 4599
ronverdonk
4,258 Expert 4TB
I think the answer is not that simple to get. Usually there are 3 reasons to have reserved words or characters:
  1. they are part of the language itself (such as $_POST or isset) and would confuse any compiler or interpreter
  2. they are difficult to parse and the designers want to prevent difficult parsing (e.g. you don't want to write 1000 lines of code just to intercept a bracket)
  3. they are used (reserved) for internal program purposes only
In case 2 and 3 you will not find it in any public documents, for the simple reason that "what you publish will me (mis)used". Meaning that, once you have publicly documented it, people will write programs that use it (see your own statement "My motivation is the possiblity of a creative use if included intelligently"), count on it that it will not change (it's documented, isn't it?) and the designers are no longer free to use or change it at will.

The only resource for this can be found in the design and development documentation of PHP itself, I don't think they will show you that.

Ronald :cool:
Oct 11 '06 #2
Thanks for the reply.

I am wondering if anybody at all knows what is supposed to happen.

My enquiry was prompted by trying to write "[null]" as an ini file key value, just to see what would happen. The script echoed the parsed version onto the html page as just that, "null" as text, so then I am thinking "what the hell is going on here then?" because php.net says quite specifically that

Values null, no and false results in ""

What now bothers me is the actual wording of this advice on php.net

"...must not be used anywhere in the key and have a special meaning in the value."

If it simply said

"must not be used anywhere in the key or the value",

one would leave it that, fair enough, but "special meaning" seems to imply that there may be a valid, albeit obscure use intended and possible for special purposes, even if it is only for something as mundane as excluding a part of the file value from the parsed value.

Knowing for instance that the quotation mark works in an ini file just as it ordinarily would to set a php variable, it is reeasonable to suppose that the other special characters would be useable.
Oct 11 '06 #3

Sign in to post your reply or Sign up for a free account.

Similar topics

7
by: Roy W. Andersen | last post by:
I've been searching google about this for days but can't find anything, so I'm hoping someone here can help me out. I'm trying to create zip-files without needing the zip-file extension in PHP,...
9
by: Safalra | last post by:
The idea here is relatively simple: a java program (I'm using JDK1.4 if that makes a difference) that loads an HTML file, removes invalid characters (or replaces them in the case of common ones...
35
by: Durgesh Sharma | last post by:
I want to use strrchar(source_string,last_char ) function from string.h header file,to find out the last occurrence of the NON SPACE Alphanumeric Character. Then i will put a NULL CHAR after...
35
by: David Mathog | last post by:
Every so often one of my fgets() based programs encounters an input file containing embedded nulls. fgets is happy to read these but the embedded nulls subsequently cause problems elsewhere in...
1
by: Zark3 | last post by:
Hi all, Unsure if this is the best group to place this, but here it is anyway ;). I've got a large text file that needs rewriting into a different format, and decided to try it using C#, which...
8
by: david.lindsay.green | last post by:
Hello all, I am quite new a web scripting and making web pages in general and I have stumbled across a problem I have as yet been unable to solve. I am trying to take the contents of a textarea box...
11
by: Ron L | last post by:
I have a barcode scanner which uses a "keyboard wedge" program so that the data it scans comes through as if it was typed on a keyboard. I am trying to have the data in the barcode be displayed in...
2
by: joakim.hove | last post by:
Hello, I am having great problems writing norwegian characters æøå to file from a python application. My (simplified) scenario is as follows: 1. I have a web form where the user can enter his...
4
by: amatoo04 | last post by:
hi guys, i am trying to finish up a program i started this morning and basically i got the whole input and output down... i just need help with the function which will scan the file and return number...
0
by: Charles Arthur | last post by:
How do i turn on java script on a villaon, callus and itel keypad mobile phone
0
by: emmanuelkatto | last post by:
Hi All, I am Emmanuel katto from Uganda. I want to ask what challenges you've faced while migrating a website to cloud. Please let me know. Thanks! Emmanuel
0
BarryA
by: BarryA | last post by:
What are the essential steps and strategies outlined in the Data Structures and Algorithms (DSA) roadmap for aspiring data scientists? How can individuals effectively utilize this roadmap to progress...
1
by: Sonnysonu | last post by:
This is the data of csv file 1 2 3 1 2 3 1 2 3 1 2 3 2 3 2 3 3 the lengths should be different i have to store the data by column-wise with in the specific length. suppose the i have to...
0
by: Hystou | last post by:
There are some requirements for setting up RAID: 1. The motherboard and BIOS support RAID configuration. 2. The motherboard has 2 or more available SATA protocol SSD/HDD slots (including MSATA, M.2...
0
Oralloy
by: Oralloy | last post by:
Hello folks, I am unable to find appropriate documentation on the type promotion of bit-fields when using the generalised comparison operator "<=>". The problem is that using the GNU compilers,...
0
by: Hystou | last post by:
Overview: Windows 11 and 10 have less user interface control over operating system update behaviour than previous versions of Windows. In Windows 11 and 10, there is no way to turn off the Windows...
0
agi2029
by: agi2029 | last post by:
Let's talk about the concept of autonomous AI software engineers and no-code agents. These AIs are designed to manage the entire lifecycle of a software development project—planning, coding, testing,...
0
isladogs
by: isladogs | last post by:
The next Access Europe User Group meeting will be on Wednesday 1 May 2024 starting at 18:00 UK time (6PM UTC+1) and finishing by 19:30 (7.30PM). In this session, we are pleased to welcome a new...

By using Bytes.com and it's services, you agree to our Privacy Policy and Terms of Use.

To disable or enable advertisements and analytics tracking please visit the manage ads & tracking page.