Hi,
Don't know which mail client you're using but it hates mine... no >, so I'm
resorting to ======== separators.
==============
why do you say "old version"?
==============
Because I've been working with 5.3.0-dev since the day the branch split, and
I have a hard time remembering what was or wasn't in 5.2.*. It seems like
light years ago...
==============
I tried to make some modifikations in main.c, everything seemed to
work pretty fine, but I was unalbe to complete that work (I must admit,
I'm not such a c-expert, I'm just programing simple stuff sometimes)
==============
That makes two of us, but I'm not sure what you mean when you say you were
unable to complete that work?
==============
later then I got a hint that modifying main.c won't help in my case since
modifications there are being interpreted only when php/apache starts,
so it's values (e.g. open_basedir) are not being set per-request - however,
is that true?
==============
That's correct, it initializes a core PHP global value (PG('open_basedir'))
during module startup. You started out saying you didn't want things to be
able to update via php.ini... So where now there's the line:
STD_PHP_INI_ENTRY("open_basedir", NULL, PHP_INI_SYSTEM, OnUpdateString,
open_basedir, php_core_globals, core_globals)
you'd have something like:
STD_PHP_INI_ENTRY("open_basedir", "the_path_you_want", PHP_INI_SYSTEM,
NULL, open_basedir, php_core_globals, core_globals)
or possibly (haven't tested)
STD_PHP_INI_ENTRY("open_basedir", "the_path_you_want", NULL, NULL,
open_basedir, php_core_globals, core_globals)
However what you're now saying is you want to set a variable value
per-request, which is a whole different story. In PHP 6 open_basedir is
INI_ALL but up to there it's INI_SYSTEM, i.e. it's only set during startup.
PHP 6 uses 'OnUpdateBaseDir', which allows open_basedir to be set at runtime
so long as it's more restrictive than the initial open_basedir setting. If
we're very lucky we might see that change in 5.3.0 too :)
Even so, I can't see how you'd prevent the value being overwritten if you
simply 'borrowed' that code, since you'd need to call OnUpdateBaseDir()
yourself to set the value in the first place... (head spins...) but what
_might_ be possible is borrowing that code and reworking OnUpdateBaseDir to
check that the runtime setting fits within the expected boundaries you need.
Then again, maybe it's time to look again at what Jochem has to say... it'd
be simpler.
Making changes in main.c would be okay with the values you genuinely want to
be static across the board, like max_execution_time - but they're
PHP_INI_SYSTEM anyway, so I'm confused as to how anybody's overwriting those
if you have exclusive control over php.ini and httpd.conf.
=============
Are you talking about PHP 5.3? I failed to find some docs about it's
configuration-directives and stuff, could you tell me about some
ressources please?
=============
Well, that manual page is generated from source, so I guess you're talking
about Jani's changes - and no, that's undocumented, so it's a case of
grepping the source @ present.
- Steph
Regards,
ehl
_________________________________________________________________
Express yourself instantly with MSN Messenger! Download today it's FREE!
http://messenger.msn.click-url.com/go/onm00200471ave/direct/01/
--
PHP Internals - PHP Runtime Development Mailing List
To unsubscribe, visit: http://www.php.net/unsub.php
--
PHP Internals - PHP Runtime Development Mailing List
To unsubscribe, visit: http://www.php.net/unsub.php