Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

create arbitrary values in php.ini

I would like to put some of my app config data in php.ini
I tried just to add new values there and then get them with ini_get
I get nothing displayed. Do I need to define new entries in an extension?
I know I can create a config file/ini file and easily parse it with PHP, But I want to avoid that. I do that as I assume it is being loaded once per process.
I do not give here the big big picture, as I want to keep it as much as possible only a technical question, sadly, this platform does not allow debates.
I do need it inside the php.ini

like image 483
Itay Moav -Malimovka Avatar asked Jun 16 '11 15:06

Itay Moav -Malimovka


1 Answers

Have you looked at get_cfg_var( config_var )?

http://www.php.net/manual/en/function.get-cfg-var.php

I believe this is for retrieving custom variables from e.g. the servers php.ini file

like image 128
Mads Ohm Larsen Avatar answered Sep 25 '22 08:09

Mads Ohm Larsen