======
= I've run into the same thing in the past, ended up moving to virtual machines 
in order
= to circumvent ... BUT ... I found something which can apparently work in this 
particular
= case. have a google for 'mod_macro' ... from what I read it will do what you 
want and it'll
= save you having to hack the php source.
= 
=> well, I know about mod_macro - and also have it in use, but it doesn't 
really help, since it 
=> does not solve the problems I've got here. 
= 
= funny, a chap in the forum on the following URL states that he is using 
mod_macro to do exactly
= what you want (afaict) namely set open_basedir on a per request basis in a 
dynamic vhost:
=  
= http://www.apachelounge.com/forum/viewtopic.php?p=7863
=  
=> I require mod_vhost because I've got several
= 
= if the above url is not telling the truth then maybe an alternative is 
mod_vhs:
= 
= http://www.oav.net/projects/mod_vhs/
= 
= I don't know it personally but a quick scouring of the page reveals some php 
specific stuff
= for setting per request ini settings, mod_vhs itself being, it seems, an 
alternative to mod_vhost
= 
=> thousand vhosts in my config, which slow down apache everytime it reloads 
it's configuration,
=> which is required about 3 times every hour since the configuration changes 
in this period.
=> So mod_vhost can solve that problem, because in my case no apache-reload is 
required 
=> then. This reload makes the server unreachable for about 1-2 minutes, that's 
just way too
=> much downtime - 3 times a hour..
======

hello,


those modifications mentioned here 
http://www.apachelounge.com/forum/viewtopic.php?p=7863 didn't
really help, i tried to implement them before, but php just ignored them.

i also tried mod_vhs, it's just that it's not supported any more (at least, it 
seems so) and it's
also pretty "old" (2005) and requires LDAP as far as I figured out.


@ Steph,

==============
= 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?

well, I managed to modify stuff like

STD_PHP_INI_ENTRY("open_basedir", "the_path_you_want", PHP_INI_SYSTEM, 
NULL, open_basedir, php_core_globals, core_globals)

.. but "the_path_you_want" can only be a constant. In my case i wrote a
function which returns the correct value for the vhost (which is dynamically
set) and what i did not manage to do is to insert that return-value at the
place where that constant ("the_path_you_want") is expected.
however, these efforts seem to be wortless, since php processes these values
only during startup - and not per request (this is, what i need).

=  
= 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 :)

Some guy in an IRC-channel told me that OpenBaseDir will be removed in PHP6,
I guess he was mistaken? however, when can I expect a stable release for 5.3.0?
I'd like to try to use it, but I really require stable software since thousands
of websites depend on it - and on the fact that the parser must not fail, 
meaning
that it returns unparsed php-code as text, visible to each website-visitor.

 
= 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.

So I *could* try to figure out how this works using php 5.3, if I can expect 
that
it doesn't work too unstable... 
 
 
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

Reply via email to