If you are talking about the libxml_set_streams_context, the php streams are registered by default so that function is not even used unless explicitly called to use a specific stream. I also dont see how that patch could work as in the request shutdown, it calls xmlRegisterDefaultInputCallbacks which wont do anything as it returns immediately if the callbacks have already been initialized (it doesnt perform a reset on the streams; They have to be explicitly destroyed, which would be rebuilt again when needed.
I am not sure how correct my assumptions are here, was just looking at the libxml code, but am trying to get some more info from the libxml people to see if they can shed more light on this. Looking further into the libxml callbacks, the get registered as a true global and the functions are not reentrant safe. So even if set on the request, they would be global until destroyed. If they were destroyed on the request shutdown, it looks like there is a possiblity that someone could be trying to match a callback while someone else is removing them. So in short, I'm not sure how isolated we can keep any of the streams functionality. Rob From: Rasmus Lerdorf > Is it not possible to do this at the time set_streams_context is called? > I am weary of having this done per-request for all PHP requests regardless > of whether or not they actually call anything in libxml. > > -Rasmus > > On Fri, 28 May 2004, Andi Gutmans wrote: > > > Anyone see a problem with this patch? If not, I'd like to include it in RC3 > > because it makes sense. -- PHP Internals - PHP Runtime Development Mailing List To unsubscribe, visit: http://www.php.net/unsub.php