php.net |  support |  documentation |  report a bug |  advanced search |  search howto |  statistics |  random bug |  login
Bug #63831 Specific 4G/4096M/4194304K memory_limit Fatal Error
Submitted: 2012-12-21 20:24 UTC Modified: 2012-12-21 22:30 UTC
From: scott at schrecktech dot com Assigned:
Status: Not a bug Package: *Configuration Issues
PHP Version: Irrelevant OS: Multiple
Private report: No CVE-ID: None
View Add Comment Developer Edit
Welcome! If you don't have a Git account, you can't do anything here.
You can add a comment by following this link or if you reported this bug, you can edit this bug over here.
(description)
Block user comment
Status: Assign to:
Package:
Bug Type:
Summary:
From: scott at schrecktech dot com
New email:
PHP Version: OS:

 

 [2012-12-21 20:24 UTC] scott at schrecktech dot com
Description:
------------
---
From manual page: http://www.php.net/ini.core
---

PHP will not run with a 4G, 4096M or 4194304K

PHP Fatal error:  Allowed memory size of 262144 bytes exhausted (tried to allocate 
523800 bytes) in Unknown on line 0


Test script:
---------------
Change the memory_limit from the byte value to the "K", "M" or "G" version of 4Gb to see fatal error.

EXAMPLE:

; works:
memory_limit = 4294967296

; fails:
;memory_limit = 4G
;memory_limit = 4096M
;memory_limit = 4194304K

Expected result:
----------------
One should be able to set the memory_limit with the "G", "M" and "K" versions of 
4Gb.


Patches

Add a Patch

Pull Requests

Add a Pull Request

History

AllCommentsChangesGit/SVN commitsRelated reports
 [2012-12-21 22:30 UTC] felipe@php.net
Please, take a look at bug #54201.
 [2012-12-21 22:30 UTC] felipe@php.net
-Status: Open +Status: Not a bug
 [2012-12-28 17:06 UTC] scott at schrecktech dot com
bug #54201 does show the same issue, but this entry below identifies that it is explicitly at a unique value where the bug occurs, not using the byte value.
 [2012-12-28 19:40 UTC] scott at schrecktech dot com
The "zend_alloc.c" shows the error condition being hit when setting the 
memory_limit with non-byte value equal to 4G.  

may be the differences in line 1965 and line 2276?  A debug build may show the 
filename and line number?
 
PHP Copyright © 2001-2024 The PHP Group
All rights reserved.
Last updated: Thu Apr 18 13:01:27 2024 UTC