Groups | Search | Server Info | Keyboard shortcuts | Login | Register [http] [https] [nntp] [nntps]


Groups > comp.lang.php > #19051 > unrolled thread

load an INI file from another INI file

Started byFlash <new@flash.foto>
First post2022-07-09 09:48 +0200
Last post2022-07-09 14:29 +0200
Articles 3 — 2 participants

Back to article view | Back to comp.lang.php


Contents

  load an INI file from another INI file Flash <new@flash.foto> - 2022-07-09 09:48 +0200
    Re: load an INI file from another INI file "J.O. Aho" <user@example.net> - 2022-07-09 12:33 +0200
      Re: load an INI file from another INI file Flash <new@flash.foto> - 2022-07-09 14:29 +0200

#19051 — load an INI file from another INI file

FromFlash <new@flash.foto>
Date2022-07-09 09:48 +0200
Subjectload an INI file from another INI file
Message-ID<tabbrv$1l4n$1@gioia.aioe.org>
See 
https://docs.oracle.com/cd/E51711_01/TSG/FAQ/Can%20I%20load%20an%20INI%20file%20from%20another%20INI%20file_.html

Therefore

$ tree /var/tmp/config
├── FSISYS.INI
├── FSIUSER.INI
└── sub
     └── config.INI

$ cat FSISYS.INI
< INIFiles >
     File = sub/config.INI

$ cat FSIUSER.INI
< INIFiles >
     File = sub/config.INI

$ PHP_INI_SCAN_DIR=/var/tmp/config php -i \
| grep INI
PHP_INI_SCAN_DIR => /var/tmp/config
$_SERVER['PHP_INI_SCAN_DIR'] => /var/tmp/config

You can already guess that the file sub/config.INI is not loading.
Here is a more specific examination

$ PHP_INI_SCAN_DIR=/var/tmp/config php -i \
| grep sub/config.INI || echo NOT FOUND
NOT FOUND

Why?

[toc] | [next] | [standalone]


#19052

From"J.O. Aho" <user@example.net>
Date2022-07-09 12:33 +0200
Message-ID<jit3smF1kdnU1@mid.individual.net>
In reply to#19051
On 09/07/2022 09.48, Flash wrote:
> See 
> https://docs.oracle.com/cd/E51711_01/TSG/FAQ/Can%20I%20load%20an%20INI%20file%20from%20another%20INI%20file_.html 

Seems that most of the FAQ's are related to FSI, which I assume is one 
of Oracles own products and those I wouldn't take that to mean all ini 
files has support for loading another ini file with a setting.

php.ini is a quite well documented one and never documented that you 
could load another ini file by giving it's location.

PHP do support loading additional/alternative ini files based on the web 
service configuration, in general that is limited to load the ini file 
that is located in the execution directory.


> You can already guess that the file sub/config.INI is not loading.
> Here is a more specific examination
> 
> $ PHP_INI_SCAN_DIR=/var/tmp/config php -i \
> | grep sub/config.INI || echo NOT FOUND
> NOT FOUND
> 
> Why?

PHP not Oracles FSI, but you can always submit a patch to add this 
behavior to PHP, then it's a question it the PHP developers will accept 
it or not.

-- 

  //Aho

[toc] | [prev] | [next] | [standalone]


#19053

FromFlash <new@flash.foto>
Date2022-07-09 14:29 +0200
Message-ID<tabsb5$a8q$1@gioia.aioe.org>
In reply to#19052
Il 09/07/22 12:33, J.O. Aho ha scritto:
> ...

thanks

[toc] | [prev] | [standalone]


Back to top | Article view | comp.lang.php


csiph-web