I'm curious about some of the semantics behind PHP_INI_MH. In my Python extension, I use some custom INI callbacks to set values inside of the Python environment. The Python interpreter is initialized inside of PHP_MINIT_FUNCTION.
It appears as though PHP invokes PHP_INI_MH callbacks for values that exist in the php.ini file _before_ the extension is initialized. Therefore, it is necessary for me to test whether or not the Python interpreter has been initialized inside of my PHP_INI_MH callback for both php.ini values and ini_set() calls to work. However, values set in php.ini are never applied to the Python environment because the interpreter never exists at the time the PHP_INI_MH callback is invoked. My solution is to use extension globals to store the new INI values upon entering PHP_INI_MH. If the extension has been initialized, the settings are applied to the Python environment immediately. Otherwise, PHP_MINI_FUNCTION explicitly applies any "cached" INI changes that are now stored in global variables. This doesn't strike me as ideal, but it seems like the best way to handle this situation. Are there other ways? -- Jon Parise ([EMAIL PROTECTED]) :: The PHP Project (http://www.php.net/) -- PHP Development Mailing List <http://www.php.net/> To unsubscribe, visit: http://www.php.net/unsub.php