Re: [PHP-DEV] PHP socket automatically shuts down after ? hours of idling?

2009-11-01 Thread mm w
Hi what is your platform ?2. Provide a working, migth be a recent problem regarding x socket, can you observe and dump your tcp connexion? On Sunday, November 1, 2009, Chris Jiang wrote: > Hi Hannes, > > It just shuts down the socket server without any error, warning or notice. > I'm sorry tha

Re: [PHP-DEV] PHP socket automatically shuts down after ? hours of idling?

2009-11-01 Thread Chris Jiang
Hi Hannes, It just shuts down the socket server without any error, warning or notice. I'm sorry that I can't provide a case for reproduction, because I don't even know where the problem is, and where I should shorten the script to. However, there is a strange behavior that might help to targe

Re: [PHP-DEV] Seg fault when using active_symbol_table called from userspace function.

2009-11-01 Thread Mark Skilbeck
Scott MacVicar wrote: On 1 Nov 2009, at 21:41, Mark Skilbeck wrote: Scott MacVicar wrote: On 1 Nov 2009, at 21:09, Mark Skilbeck wrote: [snip] There is no symbol table as there are no variables. You should check if it's NULL before using zend_hash_exists. Scott Hi, Scott. I'm having trou

Re: [PHP-DEV] Seg fault when using active_symbol_table called from userspace function.

2009-11-01 Thread Scott MacVicar
On 1 Nov 2009, at 21:41, Mark Skilbeck wrote: Scott MacVicar wrote: On 1 Nov 2009, at 21:09, Mark Skilbeck wrote: [snip] There is no symbol table as there are no variables. You should check if it's NULL before using zend_hash_exists. Scott Hi, Scott. I'm having trouble - I added the che

Re: [PHP-DEV] Seg fault when using active_symbol_table called from userspace function.

2009-11-01 Thread Mark Skilbeck
Scott MacVicar wrote: On 1 Nov 2009, at 21:09, Mark Skilbeck wrote: [snip] There is no symbol table as there are no variables. You should check if it's NULL before using zend_hash_exists. Scott Hi, Scott. I'm having trouble - I added the check to see if the symbol table i available, ye

Re: [PHP-DEV] Seg fault when using active_symbol_table called from userspace function.

2009-11-01 Thread Mark Skilbeck
Scott MacVicar wrote: On 1 Nov 2009, at 21:09, Mark Skilbeck wrote: [snip] There is no symbol table as there are no variables. You should check if it's NULL before using zend_hash_exists. Scott Ah - of course. Thanks for that, Scott. -- PHP Internals - PHP Runtime Development Mailing

Re: [PHP-DEV] Seg fault when using active_symbol_table called from userspace function.

2009-11-01 Thread Scott MacVicar
On 1 Nov 2009, at 21:09, Mark Skilbeck wrote: Can you explain to me why the following causes a segfault: [code] PHP_FUNCTION(sample_var_a_exists) { if (!zend_hash_exists(EG(active_symbol_table), "a", sizeof("a"))) { RETURN_BOOL(0); } RETURN_BOOL(1); } [/code] Note: the segfaul

[PHP-DEV] Seg fault when using active_symbol_table called from userspace function.

2009-11-01 Thread Mark Skilbeck
Can you explain to me why the following causes a segfault: [code] PHP_FUNCTION(sample_var_a_exists) { if (!zend_hash_exists(EG(active_symbol_table), "a", sizeof("a"))) { RETURN_BOOL(0); } RETURN_BOOL(1); } [/code] Note: the segfault only occurs when the sa

Re: [PHP-DEV] PHP socket automatically shuts down after ? hours of idling?

2009-11-01 Thread Hannes Magnusson
2009/10/28 Chris Jiang : > Hi all, here is another question that made me confused. I'm not sure if > it's a bug or what, but I can't find an answer from the search engines. > > I've made a chat server using php socket features, and it works pretty > well as I've expected. However, there is a weird

Re: [PHP-DEV] Is an extension dev. on 5.x usable on 5.>x

2009-11-01 Thread Pierre Joye
hi, On Sun, Nov 1, 2009 at 1:16 PM, Mark Skilbeck wrote: > Ah! Thanks for the info. So it is possible to prevent the 'not built on the > same PHP version' problems (i.e., turn it off)? My reply gave you the reason of this message. It has nothing to do with the platform you use (be windows, linux

Re: [PHP-DEV] Is an extension dev. on 5.x usable on 5.>x

2009-11-01 Thread Mark Skilbeck
Lester Caine wrote: Mark Skilbeck wrote: That is, is an extension compiled on PHP5.1 usable for PHP5.2? Windows or Linux? In Linux you can normally use an older version, provided nothing else has changed. In windows you normally get a complaint that the versions are not compatible, although

Re: [PHP-DEV] Is an extension dev. on 5.x usable on 5.>x

2009-11-01 Thread Pierre Joye
hi, On Sat, Oct 31, 2009 at 11:02 PM, Mark Skilbeck wrote: > That is, is an extension compiled on PHP5.1 usable for PHP5.2? No, it only works between 5.1.x and another 5.1.x release, or 5.2.x and another 5.2.x (5.2.9 and 5.2.11 for example). We change the minor version number when a binary incom

Re: [PHP-DEV] Is an extension dev. on 5.x usable on 5.>x

2009-11-01 Thread Lester Caine
Mark Skilbeck wrote: That is, is an extension compiled on PHP5.1 usable for PHP5.2? Windows or Linux? In Linux you can normally use an older version, provided nothing else has changed. In windows you normally get a complaint that the versions are not compatible, although some of the PECL pack