0

I'm having a problem with my Facebook pull feed. It works fine on a development server, but on my live server the block doesn't appear on the page, and I get two php errors, and a single Facebook pull error in my recent logs.

The first php error, which I think is significant is:

Warning: file_get_contents(): https:// wrapper is disabled in the server configuration by allow_url_fopen=0 in _facebook_pull_feed() (line 280 of /home/phislub9/public_html/sites/all/modules/facebook_pull/facebook_pull.module).

The second php error is related to the first one:

Warning: file_get_contents(https://graph.facebook.com/oauth/access_token?client_id=1392108967676515&client_secret=563ff2dd27ddec75d9b79dc918fe93d4&grant_type=client_credentials): failed to open stream: no suitable wrapper could be found in _facebook_pull_accesstoken() (line 299 of /home/phislub9/public_html/sites/all/modules/facebook_pull/facebook_pull.module)

And the Facebook Pull error doesn't give any diagnostic information beyond that the module isn't working.

1 Answer 1

0

Put this in your settings.php:

ini_set('allow_url_fopen' , 1);

If that solves the issue you will want to hard code that into your php.ini.

7
  • so, that doesn't seem to have fixed it, although I'm not getting a log error yet, so I'm not sure if the facebook pull has run yet. I just checked the phpinfo.php, and the local and master values for 'allow_url_fopen' are both set to off, so I don't think the override in the settings file is working. The site is on a shared server, so I don't have access to the php.ini file.
    – nizz0k
    Commented Apr 25, 2016 at 20:42
  • Which shared host? Is it one of the major ones? Commented Apr 25, 2016 at 20:55
  • It's a host called anhosting.com
    – nizz0k
    Commented Apr 25, 2016 at 20:56
  • 1
    One thing I should have asked to clarify: Are you talking about a phpinfo.php you created or the one you access through Drupal (mysite.com/admin/reports/status/php)? That makes a difference if you are trying to go through the ini_set route. I'm not seeing a ton on Google about alternate ways to update php settings with ANHosting (usually googling how to increase memory limits is more productive since that is a more common issue and is changed the same way). You may want to get on the phone with the host and ask if the change is possible or categorically blocked by their system. Commented Apr 25, 2016 at 21:07
  • Thanks, I just did this. it's as simple as dropping a php.ini in the public html folder. I'll try that and report back
    – nizz0k
    Commented Apr 25, 2016 at 21:08

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

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