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
Welcome back! If you're the original bug submitter, here's where you can edit the bug or add additional notes.
If you forgot your password, you can retrieve your password here.
Password:
Status:
Package:
Bug Type:
Summary:
From: c dot madmax at gmail dot com
New email:
PHP Version: OS:

 

 [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

Pull Requests

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-2025 The PHP Group
All rights reserved.
Last updated: Wed Apr 02 21:01:29 2025 UTC