Setting PHP module values in C

php.internals

Mark Morley

23 years ago
I'm writing an Apache module and I'd like to be able to dynamically change some of PHP's settings from within this module. Mainly I need to be able to change the current open_basedir value, although there are others as well. Is there a function call or code sequence that will let me change values like this? Mark

Uwe Schindler

23 years ago
Am Donnerstag, 14.08.03 um 07:14 Uhr schrieb Mark Morley:
> I'm writing an Apache module and I'd like to be able to dynamically > change some of > PHP's settings from within this module. > > Mainly I need to be able to change the current open_basedir value, > although there > are others as well.
zend_alter_ini_entry("open_basedir", sizeof("open_basedir"), newvalue, strlen(newvalue), PHP_INI_USER, PHP_INI_STAGE_RUNTIME)

Mark Morley

23 years ago
> zend_alter_ini_entry("open_basedir", sizeof("open_basedir"), newvalue, > strlen(newvalue), PHP_INI_USER, PHP_INI_STAGE_RUNTIME)
Ah, perfect. Thanks! Mark