Please upgrade here. These earlier versions are no longer being updated and have security issues.
HackerOne users: Testing against this community violates our program's Terms of Service and will result in your bounty being denied.
Does Vanilla v2.1 require allow_url_fopen enabled?
MasterOne
✭✭
During our hunt for the 2.1 View Count Won't Increment error at one point during testing with logging enabled I got the following DebugLog entries:
19 May 2014 - 09:30:15 TESTINSTALLATION Garden Exception: file_get_contents() [<a href='function.file-get-contents'>function.file-get-contents</a>]: http:// wrapper is disabled in the server configuration by allow_url_fopen=0 in /usr/www/users/TESTACCOUNT /TESTINSTALLATION/applications/dashboard/controllers/class.utilitycontroller.php on 47819 May 2014 - 09:30:15 TESTINSTALLATION Garden #0 [internal function]: Gdn_ErrorHandler(2, 'file_get_conten...', '/usr/www/users/...', 478, Array)19 May 2014 - 09:30:15 TESTINSTALLATION Garden #1 /usr/www/users/TESTACCOUNT/TESTINSTALLATION/applications /dashboard/controllers/class.utilitycontroller.php(478): file_get_contents('http:/ /vanillaf...')19 May 2014 - 09:30:15 TESTINSTALLATION Garden #2 [internal function]: UtilityController->GetFeed('news', '4', 'extended')19 May 2014 - 09:30:15 TESTINSTALLATION Garden #3 /usr/www/users/TESTACCOUNT/TESTINSTALLATION/library/core/class.dispatcher.ph p(350): call_user_func_array(Array, Array)19 May 2014 - 09:30:15 TESTINSTALLATION Garden #4 /usr/www/users/TESTACCOUNT/TESTINSTALLATION/index.php(46): Gdn_Dispatcher->Dispatch()19 May 2014 - 09:30:15 TESTINSTALLATION Garden #5 {main}19 May 2014 - 09:30:16 TESTINSTALLATION Garden Exception: file_get_contents() [<a href='function.file-get -contents'>function.file-get-contents</a>]: http:// wrapper is disabled in the server configuration by allow_url_fopen=0 in /usr/www/users/TESTACCOUNT/TESTINSTALLATION /applications/dashboard/controllers/class.utilitycontroller.php on 47819 May 2014 - 09:30:16 TESTINSTALLATION Garden #0 [internal function]: Gdn_ErrorHandler(2, 'file_get_conten...', '/usr/www/users/...', 478, Array)19 May 2014 - 09:30:16 TESTINSTALLATION Garden #1 /usr /www/users/TESTACCOUNT/TESTINSTALLATION/applications/dashboard/controllers /class.utilitycontroller.php(478): file_get_contents('http://vanillaf...')19 May 2014 - 09:30:16 TESTINSTALLATION Garden #2 [internal function]: UtilityController->GetFee d('announce', '2', 'extended')19 May 2014 - 09:30:16 TESTINSTALLATION Garden #3 /usr/www /users/TESTACCOUNT/TESTINSTALLATION/library/core/class.dispatcher.php(350): call_user_func_array(Array, Array)19 May 2014 - 09:30:16 TESTINSTALLATION Garden #4 /usr /www/users/TESTACCOUNT/TESTINSTALLATION/index.php(46): Gdn_Dispatcher->Dispatch()19 May 2014 - 09:30:16 TESTINSTALLATION Garden #5 {main}19 May 2014 - 09:31:05: [Garden] /usr/www /users/TESTACCOUNT/TESTINSTALLATION/plugins/Tester/default.php, 14, Object.Method(), log message does work from the tester plugin
What is this with allow_url_fopen
? Does Vanilla need it? I just checked, it was disabled in my hoster's PHP configuration by default, as is allow_url_include
, which is the recommended setting due to security concerns.
I had allow_url_fopen
enabled on our old server, so I have enabled it on our new server as well, but I'd rather switch it off if not really required.
0
Comments
please read this
http://www.php.net/manual/en/filesystem.configuration.php
❌ ✊ ♥. ¸. ••. ¸♥¸. ••. ¸♥ ✊ ❌
Add this file and run it to see your php info
❌ ✊ ♥. ¸. ••. ¸♥¸. ••. ¸♥ ✊ ❌
I think he wants to know the security aspect of it. he knows how to add it.
in any event you might want to consider making your log file more readable.
suggestions for line breaks, etc. I thought i filed this in November 2013. nothing happened though. Apparently I only mentioned someone. So i filed it on github as well.
https://github.com/vanilla/vanilla/issues/1931
http://vanillaforums.org/discussion/comment/196492/#Comment_196492
I may not provide the completed solution you might desire, but I do try to provide honest suggestions to help you solve your issue.
@vrijvlinder, yes, @peregrine is right, it's not about how to activate that option in PHP config, but if Vanilla really needs that option enabled.
@R_J mentioned the following in the other discussion:
What I've read about
allow_url_fopen
isn't conclusive. One one hand it's supposed to be good webmaster practice to keep it disabled due to a possible security risk, on the other hand the default state seems to be "enabled" according to the PHP documentation.Q. well do you get news feeds in the dashboard. if it is disabled.
l
e.g. when you click on dashboard do you see this
I may not provide the completed solution you might desire, but I do try to provide honest suggestions to help you solve your issue.
@peregrine, you are right, news feeds work with
allow_url_fopen
enabled, and when I disable it I get the error message Failed to load news feed.there are a few other things that need it as well
if you grep for file_get_contents
you will see it is called in a few places.
I may not provide the completed solution you might desire, but I do try to provide honest suggestions to help you solve your issue.
Well, so no doubt any more to keep it enabled. Thanks a lot, @peregrine.