php.net |  support |  documentation |  report a bug |  advanced search |  search howto |  statistics |  random bug |  login
Bug #54443 ini_set('memory_limit', '512M') fail
Submitted: 2011-04-01 15:52 UTC Modified: 2011-04-01 20:36 UTC
From: c dot madmax at gmail dot com Assigned:
Status: Not a bug Package: PHP options/info functions
PHP Version: 5.3.6 OS: Debian Squeeze
Private report: No CVE-ID: None
 [2011-04-01 15:52 UTC] c dot madmax at gmail dot com
Description:
------------
ini_set('memory_limit', $value) return false if i try to use more than 128M of memory! No error message is generated!

It worked in PHP 5.2.9 witout any problems.

Test script:
---------------
if(ini_set('memory_limit', '512M'))
{
  echo "memory_limit set to 512MB";
}
else
{
  echo "ini_set() failed!"
};

Expected result:
----------------
The script should output:

memory_limit set to 512MB

Actual result:
--------------
The script output:

ini_set() failed!

Patches

Add a Patch

Pull Requests

Add a Pull Request

History

AllCommentsChangesGit/SVN commitsRelated reports
 [2011-04-01 16:13 UTC] c dot madmax at gmail dot com
Solution:

edit /etc/php5/conf.d/suhosin.ini

add

suhosin.memory_limit = 512M
 [2011-04-01 20:36 UTC] sixd@php.net
-Status: Open +Status: Bogus
 [2011-04-01 20:36 UTC] sixd@php.net
Not a core PHP issue as recognized in the bug reporter's update
 
PHP Copyright © 2001-2024 The PHP Group
All rights reserved.
Last updated: Thu Mar 28 23:01:26 2024 UTC