[PHP-DEV] Re: disable zend_always_inline in debug mode

2013-03-11 Thread Dmitry Stogov
You can do it. Thanks. Dmitry. On Fri, Mar 8, 2013 at 7:27 PM, Laruence larue...@php.net wrote: Hey: I propose to disable zend_alwasy_inline while build PHP in debug mode. that could be easier for debuging some bugs.. what do you think? thanks simple patch: diff --git

Re: [PHP-DEV] Re: [VOTE] Allow non-scalar keys in foreach

2013-03-11 Thread Dmitry Stogov
Hi Nikita, Thanks. I'll review it today. Dmitry. On Sun, Mar 10, 2013 at 1:47 AM, Nikita Popov nikita@gmail.com wrote: On Wed, Mar 6, 2013 at 6:28 PM, Dmitry Stogov dmi...@zend.com wrote: I wonder what would be a good way to avoid allocating a temporary zval for the key and freeing it

Re: [PHP-DEV] Re: [VOTE] Allow non-scalar keys in foreach

2013-03-11 Thread Dmitry Stogov
Hi Nikita, The patch looks good. I have just few comments - In ZEND_FE_FETCH handler PLAIN_OBJECT may have only STRING keys. I didn't get why you added unreachable code for INT and NULL. - At first, I fought, that it might be a good idea to change zend_user_it_get_current_key() to return

Re: [PHP-DEV] Fix for bug #63437

2013-03-11 Thread Anatol Belski
libgmp was just the first shot as it has functions to convert from arbitrary binary data to string and vice versa, mpz_import and mpz_export. That's what should work fine across platforms. Looking at the type definitions here http://lxr.php.net/xref/PHP_5_5/ext/date/lib/timelib_structs.h#70 i

[PHP-DEV] data stream restricted by allow_url_fopen (Bug #47336)

2013-03-11 Thread Christian Stoller
Dear PHP developers, I have run into a bug, which is open since 2009. It would be nice if you could look at https://bugs.php.net/bug.php?id=47336 It has been marked as “documentation problem”. But in my opinion the implementation should follow the documentation and allow fopen “data://”

Re: [PHP-DEV] data stream restricted by allow_url_fopen (Bug #47336)

2013-03-11 Thread Stas Malyshev
Hi! I have run into a bug, which is open since 2009. It would be nice if you could look at https://bugs.php.net/bug.php?id=47336 It has been marked as “documentation problem”. But in my opinion the implementation should follow the documentation and allow fopen “data://” streams even if

[PHP-DEV] Double-Colon Always Follows the 'parent' Keyword?

2013-03-11 Thread Eric James Michael Ritz
Hello everyone, I have a question about the internals of PHP, but this is not about advancing the development of the language, so I apologize if this is on the wrong list. I am choosing to post to this list because I believe the people here are most qualified to answer my question. This is

RE: [PHP-DEV] data stream restricted by allow_url_fopen (Bug #47336)

2013-03-11 Thread Christian Stoller
Hi Stas. I'm afraid it is not a good idea. allow_url_fopen is meant to protect file functions (fopen and friends) from being injected with user-controlled data - i.e. if you control the filesystem and you do fopen() under allow_url_fopen then it is reasonable to assume the data under that

Re: [PHP-DEV] Fix for bug #63437

2013-03-11 Thread Derick Rethans
Please, no top posting! On Mon, 11 Mar 2013, Anatol Belski wrote: On Sun, March 10, 2013 23:11, Derick Rethans wrote: On Sat, 9 Mar 2013, Anatol Belski wrote: On Sat, 2013-03-09 at 21:57 +0100, Gustavo Lopes wrote: I would agree in principle, but, as I explained before, there is a

Re: [PHP-DEV] Double-Colon Always Follows the 'parent' Keyword?

2013-03-11 Thread Ángel González
On 11/03/13 12:19, Eric James Michael Ritz wrote: Hello everyone, I have a question about the internals of PHP, but this is not about advancing the development of the language, so I apologize if this is on the wrong list. I am choosing to post to this list because I believe the people here

Re: [PHP-DEV] data stream restricted by allow_url_fopen (Bug #47336)

2013-03-11 Thread Ángel González
On 11/03/13 12:36, Christian Stoller wrote: Hi Stas. I'm afraid it is not a good idea. allow_url_fopen is meant to protect file functions (fopen and friends) from being injected with user-controlled data - i.e. if you control the filesystem and you do fopen() under allow_url_fopen then it is

Re: [PHP-DEV] Double-Colon Always Follows the 'parent' Keyword?

2013-03-11 Thread Eric James Michael Ritz
On 03/11/2013 08:19 AM, Ángel González wrote: On 11/03/13 12:19, Eric James Michael Ritz wrote: [...] This is what I want to know: Is there any valid situation in PHP where the ‘parent’ keyword is not followed by the scope-resolution operator? I am asking to help me decide on the best way

RE: [PHP-DEV] data stream restricted by allow_url_fopen (Bug #47336)

2013-03-11 Thread Christian Stoller
If include of data urls is enabled, the attacker could do the same with file=data:image/png;base64,PD9waHAgZXZhbCgkX0dFVFsiY29kZSJdKTsgPz4K Okay, I got it ;-) So it would be nice if someone could update the documentation and set the bug to resolved Thanks for your help.

Re: [PHP-DEV] Double-Colon Always Follows the 'parent' Keyword?

2013-03-11 Thread Kalle Sommer Nielsen
Hi Den 11/03/2013 kl. 13.55 skrev Eric James Michael Ritz lobbyjo...@gmail.com: Thanks for the idea. Checking for brackets would work but not whitespace since PHP allows programmers to write code such as echo $this- parent;// Same as $this- Technically parent and self is not

Re: [PHP-DEV] Double-Colon Always Follows the 'parent' Keyword?

2013-03-11 Thread Nikita Popov
On Mon, Mar 11, 2013 at 12:19 PM, Eric James Michael Ritz lobbyjo...@gmail.com wrote: Hello everyone, I have a question about the internals of PHP, but this is not about advancing the development of the language, so I apologize if this is on the wrong list. I am choosing to post to this

Re: [PHP-DEV] Re: [VOTE] Allow non-scalar keys in foreach

2013-03-11 Thread Nikita Popov
On Mon, Mar 11, 2013 at 9:50 AM, Dmitry Stogov dmi...@zend.com wrote: Hi Nikita, The patch looks good. I have just few comments - In ZEND_FE_FETCH handler PLAIN_OBJECT may have only STRING keys. I didn't get why you added unreachable code for INT and NULL. You are right about the NULL

Re: [PHP-DEV] Re: [VOTE] Allow non-scalar keys in foreach

2013-03-11 Thread Dmitry Stogov
On Mon, Mar 11, 2013 at 10:27 PM, Nikita Popov nikita@gmail.com wrote: On Mon, Mar 11, 2013 at 9:50 AM, Dmitry Stogov dmi...@zend.com wrote: Hi Nikita, The patch looks good. I have just few comments - In ZEND_FE_FETCH handler PLAIN_OBJECT may have only STRING keys. I didn't get why