RE: [PHP-DEV] CVS update: php31/ext/standard From: Rasmus Lerdorf (rasmus <email protected>)
Date: 05/30/98

> Should I just undefine HAVE_PUTENV when THREAD_SAFE is defined?

For now, yes.

> I think the only way we could have thread-local environments is if we built
> it ourselves, and then implemented getenv/putenv ourselves to read from our
> faked environment. It could be done that on process startup, the
> enivironment is read into a global env_master variable, then at request
> startup it is just memcpy'd into GLOBAL(thread_env). I dont know if it
> would be of any benefit though. What do you think?

I don't think it would help much. The main use for putenv() in PHP is to
set things for external libraries. Like ORACLE_HOME, for example. If we
create our own internal version of the environment, these external
libraries won't be able to see these anyway and the whole point is lost.

-Rasmus