Re: PHP (anti) crash policy?

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



Manuel Lemos wrote:
Hello,

On 10/03/2004 01:46 PM, Olaf Van Der Spek wrote:

Why?
I think a large number of data handling functions would benefit from such a function.
And it'd make PHP more robust.


Because it is an hack to work around the lack of support for detection of corrupted data in zlib.

In the end you will be able to handle the failure of zlib but you will not be able to tell whether it failed because the file was too large to decompress or because it failed due to corrupted data.

I think it would be better that zlib would be able to detect corrupted data so you could eventually tell the user that the file is corrupted instead of misleading with a message saying there was not enough memory.

I know zlib itself doesn't crash due to invalid input.
However, even in that case, what do you do with valid input that causes out of memory errors?


--
PHP General Mailing List (http://www.php.net/)
To unsubscribe, visit: http://www.php.net/unsub.php


[Index of Archives]     [PHP Home]     [Apache Users]     [PHP on Windows]     [Kernel Newbies]     [PHP Install]     [PHP Classes]     [Pear]     [Postgresql]     [Postgresql PHP]     [PHP on Windows]     [PHP Database Programming]     [PHP SOAP]

  Powered by Linux