|  support |  documentation |  report a bug |  advanced search |  search howto |  statistics |  random bug |  login
Doc Bug #50972 ini_set() doesnt work with safe_mode
Submitted: 2010-02-09 15:18 UTC Modified: 2010-02-09 23:20 UTC
From: mortals at seznam dot cz Assigned:
Status: Wont fix Package: Documentation problem
PHP Version: 5.2.12 OS:
Private report: No CVE-ID: None
View Add Comment Developer Edit
Anyone can comment on a bug. Have a simpler test case? Does it work for you on a different platform? Let us know!
Just going to say 'Me too!'? Don't clutter the database with that please — but make sure to vote on the bug!
Your email address:
Solve the problem:
50 - 38 = ?
Subscribe to this entry?

 [2010-02-09 15:18 UTC] mortals at seznam dot cz
ini_set() doesnt work with safe_mode

Reproduce code:
From manual page:
echo ini_get('safe_mode')."<br>\n";
var_dump(ini_set('memory_limit', '64M'));
//string(3) "40M" 64M

//change safe_mode to On
//and new output is
//bool(false) 40M

Expected result:
ini_set() in list:


working ini_set() with safe_mode

Actual result:
see reproduce code


Add a Patch

Pull Requests

Add a Pull Request


AllCommentsChangesGit/SVN commitsRelated reports
 [2010-02-09 23:20 UTC]
Thanks for your report.

You can set some directives using ini_set() even with safe mode on. An example would be display_errors. We would have to figure out which directives that are affected. Seeing as safe mode is deprecated as of PHP 5.3.0, doing that isn't really feasible.
PHP Copyright © 2001-2024 The PHP Group
All rights reserved.
Last updated: Sat Jun 22 13:01:29 2024 UTC