Re: [PHP-DEV] fully enabling dl() for FPM SAPI

2011-01-18 Thread Antony Dovgal
On 01/17/2011 09:19 PM, Johannes Schlüter wrote: I think it can be quite dangerous if you have extensions living shorter than the PHP process. Not only might dlclose() cause some leaks but there are a few extensions playing with function pointers or opcode handlers which aren't properly reset

[PHP-DEV] [url fixes for] Experiments with a threading library for Zend: spawning a new executor

2011-01-18 Thread Sam Vilain
On 18/01/11 17:21, Sam Vilain wrote: (full code is available at http://github.com/openparallel/php-src.git ) *ahem* that should be http://github.com/openparallel/php-src In fact to skip straight to the function, try http://github.com/openparallel/php-src/blob/9205db3/ext/tbb/tbb.c#L208

Re: [PHP-DEV] Experiments with a threading library for Zend: spawning a new executor

2011-01-18 Thread Stas Malyshev
Hi! 1) any hints or clues from people familiar with the Zend subsystems - such as memory management, and the various stacks, to provide hints as to how to set them up correctly Zend Engine keeps all state (including memory manager state, etc.) separate in each thread, which means once you've

Re: [PHP-DEV] fully enabling dl() for FPM SAPI

2011-01-18 Thread Johannes Schlüter
On Tue, 2011-01-18 at 11:00 +0300, Antony Dovgal wrote: On 01/17/2011 09:19 PM, Johannes Schlüter wrote: I think it can be quite dangerous if you have extensions living shorter than the PHP process. Not only might dlclose() cause some leaks but there are a few extensions playing with

Re: [PHP-DEV] fully enabling dl() for FPM SAPI

2011-01-18 Thread Derick Rethans
On Fri, 14 Jan 2011, Antony Dovgal wrote: Are there any objections if I disable E_DEPRECATED notice in dl() for FPM SAPI? The notice is already disabled for CGI/FastCGI, CLI and Embed SAPIs. I believe there's no reason for this notice in case of FPM, too. IMO, it should be disabled in

[PHP-DEV] SVN Account Request: sascham78

2011-01-18 Thread Sascha Meyer
Providing updates to the windows.php.net websites: code cleanup, template updates, adding links to the download archives, maintenance work -- PHP Internals - PHP Runtime Development Mailing List To unsubscribe, visit: http://www.php.net/unsub.php

[PHP-DEV] [PATCH] Update to the windows.php.net downloads page

2011-01-18 Thread Sascha Meyer
Good afternoon, I added a link to the qa/releases/snapshots archives on the PHP for Windows downloads page, because older releases of the Windows PHP builds were not linked on the downloads site. I would also like to improve the functionality of windows.php.net and do some code restructuring,

Re: [PHP-DEV] [PATCH] Update to the windows.php.net downloads page

2011-01-18 Thread Johannes Schlüter
On Tue, 2011-01-18 at 17:09 +0100, Sascha Meyer wrote: Good afternoon, I added a link to the qa/releases/snapshots archives on the PHP for Windows downloads page [...] I would love if we could move all that back to php.net, downloads should use our mirrors for serving users best and giving

Re: [PHP-DEV] [PATCH] Update to the windows.php.net downloads page

2011-01-18 Thread Pierre Joye
hi, Yes, I asked you to send me a patch, easier to review and apply. Cheers, On Tue, Jan 18, 2011 at 5:09 PM, Sascha Meyer harlequ...@gmx.de wrote: Good afternoon, I added a link to the qa/releases/snapshots archives on the PHP for Windows downloads page, because older releases of the

Re: [PHP-DEV] [PATCH] Update to the windows.php.net downloads page

2011-01-18 Thread Pierre Joye
even better would be to report a bug at bugs.php.net and attach the patch to it :) Thanks! On Tue, Jan 18, 2011 at 6:36 PM, Pierre Joye pierre@gmail.com wrote: hi, Yes, I asked you to send me a patch, easier to review and apply. Cheers, On Tue, Jan 18, 2011 at 5:09 PM, Sascha Meyer

Re: [PHP-DEV] Experiments with a threading library for Zend: spawning a new executor

2011-01-18 Thread Sam Vilain
On 18/01/11 22:17, Stas Malyshev wrote: 1) any hints or clues from people familiar with the Zend subsystems - such as memory management, and the various stacks, to provide hints as to how to set them up correctly Zend Engine keeps all state (including memory manager state, etc.) separate in

[PHP-DEV] Persistent, file backed, mmap APC hack

2011-01-18 Thread Hannes Landeholm
Hi, I use a multithreaded MPM of apache called peruser where we're hosting a bunch of sites, each with their own virtual host. Each virtual host needs to be isolated so I'm using chroot and other stuff to keep them apart. APC was a must as getting good throughput was important. However, APC would

Re: [PHP-DEV] Experiments with a threading library for Zend: spawning a new executor

2011-01-18 Thread Stefan Marr
Hi Sam: I am following the discussion very interested, but just a question for clarification: On 18 Jan 2011, at 22:16, Sam Vilain wrote: there doesn't seem to be an interpreter under the sun which has successfully pulled off threading with shared data. Could you explain what you mean with

Re: [PHP-DEV] Experiments with a threading library for Zend: spawning a new executor

2011-01-18 Thread Stas Malyshev
Hi! Sorry, but that's my topic, and the most well know interpreters that 'pulled off' threading with shared data are for Java. The interpreter Given to what complications Java programmers should go to make their threaded code work, I have a lot of doubt that 95% of PHP users would be able

Re: [PHP-DEV] Experiments with a threading library for Zend: spawning a new executor

2011-01-18 Thread Hannes Landeholm
Hello, I don't think a language becomes a beginners language just because many new programmers use it. And it's still not a good argument for not including new features. As long as the new thread doesn't share any memory/variables with the spawning context, no reasoning is required at all. It's

Re: [PHP-DEV] Experiments with a threading library for Zend: spawning a new executor

2011-01-18 Thread Ben Schmidt
Strongly second this. PHP is not a toy language restricted to beginners. If it has advanced features, beginners simply don't need to use them. If anything, I would argue that PHP is a language unsuited to beginners (and other scripting languages), as it is so flexible it doesn't enforce good

Re: [PHP-DEV] Experiments with a threading library for Zend: spawning a new executor

2011-01-18 Thread Sam Vilain
On 19/01/11 10:50, Stefan Marr wrote: On 18 Jan 2011, at 22:16, Sam Vilain wrote: there doesn't seem to be an interpreter under the sun which has successfully pulled off threading with shared data. Could you explain what you mean with that statement? Sorry, but that's my topic, and the most

Re: [PHP-DEV] Experiments with a threading library for Zend: spawning a new executor

2011-01-18 Thread Stas Malyshev
Hi! Yes, I expected the two functions - tsrm_new_interpreter() and init_executor() to do that, as it is the function called in php_request_startup() in main/main.c As far as I remember, you need to run the whole request startup for the the thread, otherwise there will be unitilialized

Re: [PHP-DEV] Experiments with a threading library for Zend: spawning a new executor

2011-01-18 Thread Stas Malyshev
Hi! If anything, I would argue that PHP is a language unsuited to beginners (and other scripting languages), as it is so flexible it doesn't enforce good programming practice. Java is much more a 'beginner language' because it has much stricter Contrary to popular belief, people usually

Re: [PHP-DEV] Experiments with a threading library for Zend: spawning a new executor

2011-01-18 Thread Stas Malyshev
Hi! like map express this well. The idea is that the executor can start up with no variables in scope, though hopefully shared code segments, For that you would probably need to put some severe restrictions on your code, such as: 1. No usage of default properties or statics in classes or

Re: [PHP-DEV] Experiments with a threading library for Zend: spawning a new executor

2011-01-18 Thread Ben Schmidt
On 19/01/11 3:51 PM, Stas Malyshev wrote: Hi! If anything, I would argue that PHP is a language unsuited to beginners (and other scripting languages), as it is so flexible it doesn't enforce good programming practice. Java is much more a 'beginner language' because it has much stricter

[PHP-DEV] How deep is copy on write?

2011-01-18 Thread Larry Garfield
Hi folks. I have a question about the PHP runtime that I hope is appropriate for this list. (If not, please thwap me gently; I bruise easily.) I know PHP does copy-on-write. However, how deeply does it copy when dealing with nested arrays? This is probably easiest to explain with an

Re: [PHP-DEV] How deep is copy on write?

2011-01-18 Thread Ben Schmidt
It does the whole of $b. It has to, because when you change 'baz', a reference in 'bar' needs to change to point to the newly copied 'baz', so 'bar' is written...and likewise 'foo' is written. Ben. On 19/01/11 5:45 PM, Larry Garfield wrote: Hi folks. I have a question about the PHP

Re: [PHP-DEV] How deep is copy on write?

2011-01-18 Thread Larry Garfield
That's what I was afraid of. So it does copy the entire array. Crap. :-) Am I correct that each level in the array represents its own ZVal, with the additional memory overhead a ZVal has (however many bytes that is)? That is, the array below would have $a, foo, bar, baz, bob, narf, poink,

Re: [PHP-DEV] How deep is copy on write?

2011-01-18 Thread Ben Schmidt
Yep. PHP does clock up memory very quickly for big arrays, objects with lots of members and/or lots of small objects with large overheads. There are a LOT of zvals and zobjects and things around the place, and their overhead isn't all that small. Of course, if you go to the trouble to