<p>Well, the code fix is to put an @ sign before every call to <code>ini_set</code> that Craft makes and all of Craft's dependencies in <code>craft/app/vendor</code> suppressing the error message <code>@ini_set()</code>.</p>

<p>But I definitely wouldn't recommend that as you'll have to maintain some 40+ hacks across nearly as many files that could get blown away during any auto-update.</p>

CC BY-SA 3.0
2015-01-27T20:46:16.547Z
What is the big risk with ini_set anyway. Allowing a php.ini file is just as bad I would think if not worse. Trying to figure out while hosts are disabling it. With SuPHP I would think it would not matter.
Bryan Garrant
CC BY-SA 3.0
2015-01-27T20:47:54.757Z
I've yet to read a good argument for disabling it other than the generic "security think of the children!" one.
Brad Bell
CC BY-SA 3.0
2015-01-27T20:57:38.470Z
I will convince them to host with us if possible as we don't disable it. Never had any issues on our servers. Thanks Brad.
Bryan Garrant
CC BY-SA 3.0
2015-01-27T20:00:13.860Z
2015-01-27T20:00:13.860Z
Brad Bell
<p>I have two clients using Craft and their hosts will not allow ini_set as they have it as a disabled function in the global php.ini.  I also can't enable in througth a custom php.ini.  Is there any way to modify Craft to get past the ini_set issues?  I have the site all setup, the pages work locally, when I upload to the server we just see a blank page.</p>

<p>Any advice is appreciated as they both do not want to change hosts.</p>

<p>Thanks.</p>

CC BY-SA 3.0
2015-01-27T17:25:07.543Z
Brad said this should be addressed in version 3 but anyone have a workaround?
Bryan Garrant
<server>
Any code fixes for "ini_set() has been disabled for security reasons"
# Any code fixes for "ini_set() has been disabled for security reasons"

(Asked by: username_0 on 2015-01-27)

I have two clients using Craft and their hosts will not allow ini\_set as they have it as a disabled function in the global php.ini. I also can't enable in througth a custom php.ini. Is there any way to modify Craft to get past the ini\_set issues? I have the site all setup, the pages work locally, when I upload to the server we just see a blank page.

Any advice is appreciated as they both do not want to change hosts.

Thanks.

**Tags:** server
> **Comments:**
> **username_0**: Brad said this should be addressed in version 3 but anyone have a workaround?  

---

## 1 answers

### Answer by username_1 on 2015-01-27. Score: 1

Well, the code fix is to put an @ sign before every call to `ini_set` that Craft makes and all of Craft's dependencies in `craft/app/vendor` suppressing the error message `@ini_set()`.

But I definitely wouldn't recommend that as you'll have to maintain some 40+ hacks across nearly as many files that could get blown away during any auto-update.

> **Comments:**
> **username_0**: What is the big risk with ini_set anyway. Allowing a php.ini file is just as bad I would think if not worse. Trying to figure out while hosts are disabling it. With SuPHP I would think it would not matter.  
> **username_1**: I've yet to read a good argument for disabling it other than the generic "security think of the children!" one.  
> **username_0**: I will convince them to host with us if possible as we don't disable it. Never had any issues on our servers. Thanks Brad.  

---

