# Setting PHP module values in C

- Thread: https://externals.io/message/3896
- Original archive: https://news-web.php.net/php.internals/3896
- Started by Mark Morley on 2003-08-14T05:14:46+00:00
- Messages: 2
- Reply by email to internals@lists.php.net
- More for agents: search with https://externals.io/search.md?q={query} · JSON API at https://externals.io/api · documentation at https://externals.io/llms.txt

---

## #3896 — Mark Morley — 2003-08-14T05:14:46+00:00

URL: https://externals.io/message/3896#3896

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

---

## #3898 — Uwe Schindler — 2003-08-14T07:09:49+00:00

URL: https://externals.io/message/3896#3898 · In reply to: #3896

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)

> Is there a function call or code sequence that will let me change 
> values like this?
>
> Mark
