[PHP-DEV] Re: Chasing an SSL stream segfault

2013-04-01 Thread Rasmus Lerdorf
On 04/01/2013 07:49 PM, Rasmus Lerdorf wrote: > ==12085== Uninitialised value was created by a stack allocation > ==12085==at 0x7B54530: ASN1_STRING_to_UTF8 (in > /lib/x86_64-linux-gnu/libcrypto.so.1.0.0) Looks like these ASN1_STRING_to_UTF8 ones are normal for libcrypto. Really hard to debu

[PHP-DEV] Re: Chasing an SSL stream segfault

2013-04-01 Thread Rasmus Lerdorf
On 04/01/2013 07:49 PM, Rasmus Lerdorf wrote: > This standalone self-contained test script segfaults on Centos 6.2 for > me with PHP 5.4: > > https://gist.github.com/anonymous/5289189 Oops, the script gist is actually: https://gist.github.com/anonymous/526 -Rasmus -- PHP Internals - PHP R

[PHP-DEV] Chasing an SSL stream segfault

2013-04-01 Thread Rasmus Lerdorf
This standalone self-contained test script segfaults on Centos 6.2 for me with PHP 5.4: https://gist.github.com/anonymous/5289189 The Valgrind output is: https://gist.github.com/anonymous/5289189 So it is as if SSL_CTX_use_certificate_chain_file() is calling ASN1_item_free() on something that i

[PHP-DEV] how to determine errno on user space?

2013-04-01 Thread chobie
Hi, I'm writing some socket client (fluentd client) with PHP and I have a question. I want to retry fwrite or some socket function when I met recoverable errno (e.g, EAGAIN). but PHP does not have any function to determine errno as far as I known. what is the correct way to handle errno? I'd like

Re: [PHP-DEV] [RFC] more secure unserialize()

2013-04-01 Thread Steve Clay
On 4/1/13 3:18 PM, Stas Malyshev wrote: Why? Making use of one parameter is orders of magnitude easier than refactoring your whole application to not use serialize() (especially if you need object support). Under the RFC, unserialize could potentially create __PHP_Incomplete_Class objects (inc

Re: [PHP-DEV] [RFC] more secure unserialize()

2013-04-01 Thread Stas Malyshev
Hi! > Yeah, well, the people who do that are also the ones that are unlikely > to make use of the new parameters to secure themselves. In order to make Why? Making use of one parameter is orders of magnitude easier than refactoring your whole application to not use serialize() (especially if you

Re: [PHP-DEV] Re: libmagic 5.14 upgrade

2013-04-01 Thread Anatol Belski
Stas, I've invested more time and here's almost cleaned up patch http://belski.net/phpz/finfo/finfo_5.14_10.patch.gz The tests pass, valgrind is happy, as well Windows. I've noticed no behaviour change, except - as the data is updated and one might see different (eventually better) results. Ple

Re: [PHP-DEV] Add a constant to reflect --with-curlwrappers

2013-04-01 Thread Laruence
On Mon, Apr 1, 2013 at 7:18 AM, Hannes Magnusson wrote: > On Sun, Mar 31, 2013 at 6:25 AM, Laruence wrote: > > Hey: > > > >there are some issues when people run some codes in a php which is > > compiled with --with-curlwrappers, like #61336, or the recently test > script > > for #64433 (fail

Re: [PHP-DEV] Add a constant to reflect --with-curlwrappers

2013-04-01 Thread Jordi Boggiano
On 01.04.2013 01:18, Hannes Magnusson wrote: >>I propose to add a constant : bool CURL_WRAPPERS_ENABLE +1 on a constant if it has to stay. We had to do pretty ugly stuff to detect it in the composer installer https://github.com/composer/getcomposer.org/blob/master/web/installer#L135-148 > The

Re: [PHP-DEV] Add a constant to reflect --with-curlwrappers

2013-04-01 Thread Pierre Joye
On Mon, Apr 1, 2013 at 10:17 AM, Madara Uchiha wrote: > I actually agree with that. I've reached a point when I consider using > fsockopen instead of curl to fetch information from a website. I can > hardly stand cURL. Curl stream wrappers and ext/curl are two different things. ext/curl APIs is q

Re: [PHP-DEV] Add a constant to reflect --with-curlwrappers

2013-04-01 Thread Madara Uchiha
I actually agree with that. I've reached a point when I consider using fsockopen instead of curl to fetch information from a website. I can hardly stand cURL. There should be a decent OOP based wrapper for making HTTP requests to handle it decently. Meanwhile, I agree that cURL needs to go. On Mo