Re: [PHP-DEV] How to embed PHP5 into multi-threaded C app?

2005-03-01 Thread Vadka
On Tue, 1 Mar 2005, Alan Knowles wrote: I think derick does something like this in SRM, but basically if you want to load something in the global thread, and let the children inherit the data / classes /function etc. AFAIR you need to serialize the opcodes, and copy them for each thread. (or use

Re: [PHP-DEV] How to embed PHP5 into multi-threaded C app?

2005-03-01 Thread Vadka
On Tue, 1 Mar 2005, Wez Furlong wrote: ZTS enabled PHP has "strong thread affinity". Calls into the engine are thread-safe provided that you have previously initialized the engine on that thread. Hm... The problem is when we create a thread and call_user_function for the function from the parent t

Re: [PHP-DEV] How to embed PHP5 into multi-threaded C app?

2005-03-01 Thread Wez Furlong
The TSRMLS_DC magic parameter passes around the thread-local storage pointer for the thread; the SG() macro uses that information to get at the sapi_globals struct for your thread. You can also stuff your own SAPI related information into SG(server_context), if you are writing a SAPI: ... in my

Re: [PHP-DEV] How to embed PHP5 into multi-threaded C app?

2005-03-01 Thread Bob Beaty
Wez, OK, I'm with you on this so far, but how do you differentiate ub_write, log_message, and sapi_error on different threads? It would seem to me that you'd need to have different functions for each thread as the calls to ub_write don't include some indication of the thread that this is bein

[PHP-DEV] Readfile() security breach

2005-03-01 Thread Marc Villemade
Hi everyone, I just wanted to let you know about this breach unveiled by Secunia today. Well, actually i'm pretty sure you know about it, but i wanted to know if it was already being investigated and if there was a plan to release a patch soon. here's the link at secunia .. http://secunia.com/ad