dan nessett wrote: > --- On Fri, 8/14/09, Dmitriy Sintsov <[email protected]> wrote: > >> I remember some time ago I was strongly discouraged to >> compile and run >> PHP threaded MPM for apache because some functions or >> libraries of PHP >> itself were not thread safe. > > While my machine was compiling AMP components, I thought about >this a little bit. It seems weird that the implementation of a >language intended to provide backend functionality for web servers >isn't thread safe. Apache and other web server software must be >threaded operationally towards infinity. How do they deal with >using a non-thread safe library? Each time a thread executes >PHP code does it have to grab a lock that protects the whole PHP library? > > Dan
You can compile PHP both thread safe or non-thread safe (note that if some php extension isn't really thread safe, it will break the server). If you aren't using a sapi based on threads, it doesn't make sense to compile php thread safe, since it will run much slower. Other servers will run it as cgi or fastcgi. If the function has several names use function_exists() or check the mediawiki version ($wgVersion). _______________________________________________ Wikitech-l mailing list [email protected] https://lists.wikimedia.org/mailman/listinfo/wikitech-l
