# Changing php.ini values in SunONE webserver question

- Thread: https://externals.io/message/10720
- Original archive: https://news-web.php.net/php.internals/10720
- Started by Uwe Schindler on 2004-06-23T09:58:44+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

---

## #10720 — Uwe Schindler — 2004-06-23T09:58:44+00:00

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

According to bug #28878 please read the last comment: 
http://bugs.php.net/bug.php?id=28878

The user wants to set doc_root or open_basedir from the obj.conf of his 
webserver. He cannot do this because the NSAPI plugin changes only 
PHP_INI_USER values:

if (zend_alter_ini_entry(entry->param->name, strlen(entry->param->name)+1,
     entry->param->value, strlen(entry->param->value),
     PHP_INI_USER, PHP_INI_STAGE_RUNTIME)==FAILURE) {
  log_error(LOG_WARN, pblock_findval("fn", NSG(pb)), NSG(sn), NSG(rq), 
"Cannot change php.ini key \"%s\" to \"%s\"", entry->param->name, 
entry->param->value);
}

NSAPI is multithreaded so changing of SYSTEM values reflects to other 
threads or not? In my thoughts at PHP_INI_STAGE_RUNTIME you can only change 
PHP_INI_USER variables or is that wrong?

-----
Uwe Schindler
thetaphi@php.net - http://www.php.net
NSAPI SAPI developer
Erlangen, Germany

---

## #10724 — Uwe Schindler — 2004-06-23T13:07:06+00:00

URL: https://externals.io/message/10720#10724 · In reply to: #10720

Its no problem... :) Works correct. Changed.

At 11:58 23.06.2004, Uwe Schindler wrote:
>According to bug #28878 please read the last comment: 
>http://bugs.php.net/bug.php?id=28878
>
>The user wants to set doc_root or open_basedir from the obj.conf of his 
>webserver. He cannot do this because the NSAPI plugin changes only 
>PHP_INI_USER values:
>
>if (zend_alter_ini_entry(entry->param->name, strlen(entry->param->name)+1,
>     entry->param->value, strlen(entry->param->value),
>     PHP_INI_USER, PHP_INI_STAGE_RUNTIME)==FAILURE) {
>  log_error(LOG_WARN, pblock_findval("fn", NSG(pb)), NSG(sn), NSG(rq), 
> "Cannot change php.ini key \"%s\" to \"%s\"", entry->param->name, 
> entry->param->value);
>}
>
>NSAPI is multithreaded so changing of SYSTEM values reflects to other 
>threads or not? In my thoughts at PHP_INI_STAGE_RUNTIME you can only 
>change PHP_INI_USER variables or is that wrong?

-----
Uwe Schindler
thetaphi@php.net - http://www.php.net
NSAPI SAPI developer
Erlangen, Germany
