|
php.net | support | documentation | report a bug | advanced search | search howto | statistics | random bug | login |
PatchesPull RequestsHistoryAllCommentsChangesGit/SVN commits
[2006-12-30 10:16 UTC] pierre dot php at gmail dot com
[2007-01-06 11:35 UTC] pierre dot php at gmail dot com
|
|||||||||||||||||||||||||||
Copyright © 2001-2025 The PHP GroupAll rights reserved. |
Last updated: Mon Oct 27 08:00:01 2025 UTC |
Description: ------------ I think the problem is somewhere in this code (static void value_hnd ...): == if (len > 2 && value[len - 2] == '\r') { value[len - 2] = 0; } else { value[len - 1] = 0; } == Reproduce code: --------------- I've created sample .htaccess file. Contents: === php_value memory_limit 999M === And I'm trying to open sample test.php file: === <?php print ini_get('memory_limit'); ini_set("memory_limit", "128M"); print ini_get('memory_limit'); ?> === 1. With 999M I have: === Allowed memory size of 999 bytes exhausted (tried to allocate 92 bytes) === 2. With 9999M I have: === Allowed memory size of 9999 bytes exhausted (tried to allocate 92 bytes) === 3. With 99999M I have: === 99999M128M === But! "phpinfo()" shows me: "memory_limit 99999M<SOME_GARBAGE_HERE>" From what I have it appears that it ignores "M" postfix because of the garbage at the end. This garbage is probably caused by some bug in your line end detection code. I've spent some time trying to fix it, no luck... Though I don't understand why you search for '\r' and nowhere search for '\n' which is the CORRECT line end in Unix. Expected result: ---------------- In all cases I've expected the example test.php to work. :-)