Interpreter configuration stored in INI file #32
Loading…
Reference in New Issue
Block a user
No description provided.
Delete Branch "%!s()"
Deleting a branch is permanent. Although the deleted branch may continue to exist for a short time before it actually gets removed, it CANNOT be undone in most cases. Continue?
I think, this is a good idea, to save Interpreter configuration in INI file, like it is done in PHP, thus giving end user more control over it. However, I was thinking about doing it in a bit another way.
General idea, is to have single INI file for storing configuration. The general section would store all interpreter's configuration, however any of them could be overwritten by SAPI-specific option. Thanks to that, end user could quickly and easily configure it, and still have some flexibility. Real life example: in general section we allow to use exec-alike functions, but in CGI specific group, we deny it and improve security.
Some options, we might already implement:
Other ideas are also welcome.
Does it have to be relatively similar to php's ? (for sort of quick migration purpose or any convenience)
I would say it doesn't have to as php.ini is rather huge file containing a lot of options. Too much of them leads to inconsistency and be a cause of non-working scripts. There are already a lot of checks done by software written in PHP and a lot of errors due to some limits, encoding, etc. I was rather thinking about some basic options. I see some reason for already mentioned parameters:
Although it may complicate things, maybe toml could be considered? It is similar to ini but feels a little less "janky" when it comes to complex configs.
I guess it depends on how complex the configs will get. If the plan is to keep them simple (simple is a good thing), then I agree that you can't go wrong with ini.
(Just providing ideas; not suggesting that something is wrong with the current plan)
I don't say no. It looks very similar to old INI. What are the advantages of using TOML, except it has data types? I suppose the implementation will be more complex than simple INI...
Makes me think ... how external dependencies should be handled ? Checking at compile time or having the dependencies codebase somewhere (as php does sometimes but not ideal...), git reference ?. Other suggestions ?
@belliash for the most part, toml is just ini but with data types and support for more complex data structures (easier to do tables, lists, etc).
For the uses described above, it sounds like toml could be overkill, but maybe it could be used if future config files start getting to complex for clean-looking ini.
I think INI is much easier to implement and it should be enough for current setup. However, if configuration file will grow, we can switch to TOML. It should give us backward compatibility and change should be transparent to end users.
Interpreter itself should behave the exact way independent on its setting. If some restrictions are necessary for web specific scenario, they should be set by CGI/FCGI SAPI. Invalid for the moment.