1

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.

1
  • Brad said this should be addressed in version 3 but anyone have a workaround? – Bryan Garrant Jan 27 '15 at 17:25
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.

3
  • 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 Jan 27 '15 at 20:46
  • I've yet to read a good argument for disabling it other than the generic "security think of the children!" one. – Brad Bell Jan 27 '15 at 20:47
  • 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 Jan 27 '15 at 20:57

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.