php.net |  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:
MUST BE VALID
Solve the problem:
50 - 38 = ?
Subscribe to this entry?

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

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

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

Expected result:
----------------
ini_set() in list:
http://cz.php.net/manual/en/features.safe-mode.functions.php

or

working ini_set() with safe_mode

Actual result:
--------------
see reproduce code

Patches

Add a Patch

Pull Requests

Add a Pull Request

History

AllCommentsChangesGit/SVN commitsRelated reports
 [2010-02-09 23:20 UTC] degeberg@php.net
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