Hi guys, I'm currently writing a PHP module compiled against 4.2.3 sources that needs to load multiple name/value pairs dynamically at run-time. Ideally, I would like to use entries in the PHP INI file, but the names of those entries will not necessarily be known at compile-time. One of two models would be ideal for my purposes; either multiple entries with the same name, or one entry that contains the names of other entries to be loaded. For instance:
mymodule.load = mymodule_foo /path/to/foo_extension.so.4.8 mymodule.load = mymodule_bar /path/to/bar_extension.so.1.5 or mymodule.load = mymodule_foo, mymodule_bar mymodule_foo = /path/to/foo_extension.so.4.8 mymodule_bar = /path/to/bar_extension.so.1.5 However, it seems that the only (non-hackish) way for a module to retrieve INI file entries is by registering the name with the ZEND_INI_* family of functions, and then retrieving the value via either a callback function or the INI_* functions. If I use the first method (multiple entries with the same name) only the last entry with that name in the INI file is passed to the callback function. If I use the second method (specifying the entry names using another, known, entry) then I can't access the sub-entries because they weren't compiled in and therefore aren't recognized by the INI file parser (as far as I can tell). Does anyone have any suggestions on how I could implement this type of configuration mechanism using existing PHP INI file functionality? I'd rather not put everything on one line, as that would become rather messy as the number of entries increases. I'd also like to avoid loading a separate configuration file just for my module, if at all possible. Thanks, Marshall -- PHP Development Mailing List <http://www.php.net/> To unsubscribe, visit: http://www.php.net/unsub.php