On Thu, 06 Feb 2003 19:47:52 +0100, Sascha Schumann wrote: >> is php re-entrant? or does it use globals/thread specific storage. if it >> does than php can not be used in a subrequest. > > It's not reentrant-safe and it uses TLS. > > - Sascha
ok.. then we have a major problem, limiting the actually usefullness of php in general in a apache2 model. unless we can make php not use TLS and use request-specific data. (or have php pass a index into TLS so that each function knows what request it is actually parsing.) the other workaround to this I guess is to parse the entire php file in one shot, and then not allow the filter chain to get it's hand on a uncompleted php request, which would force php to serialize across the thread. so .. making this into a handler would require 2 things. 1. only grabbing post data once, (and for multiple php requests in the same page the first one gets it, and the others have undefined behavior) 2a. forcing php to evaluate the entire php script before moving onto the next one. (ie.. don't pass any data down the filter chain until php is done with the lot) or 2b. modifiy php to not use TLS and passing it a handle to it's local data making it re-entrant safe. 2b is a better solution, but I think 2a could be doable faster. is this plausable?