Support » Plugin: NextScripts: Social Networks Auto-Poster » Self-Hosted: Server can't access it's own images

  • Resolved WACKA1



    I have a self hosted multisite instance but I continually get the following message about ‘Server can’t access it’s own images’ and I dont know how to resolve.
    Can anyone help?
    Thanks in advance,

    Array ( [0] => Array ( [date] => 2014-02-25 08:43:59 [act] => Error [msg] => -=ERROR=- Server can’t access it’s own images. Most probably it’s a DNS problem. Please contact your hosting provider. O:8:”WP_Error”:2:{s:6:”errors”;a:1:{s:19:”http_request_failed”;a:1:{i:0;s:21:”name lookup timed out”;}}s:10:”error_data”;a:0:{}} [extInfo] => [type] => E [nt] => IMAGE ) [1] => Array ( [date] => 2014-02-25 08:44:19 [act] => Error [msg] => -=ERROR=- Server can’t access it’s own images. Most probably it’s a DNS problem. Please contact your hosting provider. O:8:”WP_Error”:2:{s:6:”errors”;a:1:{s:19:”http_request_failed”;a:1:{i:0;s:38:”Couldn’t resolve host ‘'”;}}s:10:”error_data”;a:0:{}} [extInfo] => [type] => E [nt] => IMAGE )

Viewing 7 replies - 1 through 7 (of 7 total)
  • Plugin Author NextScripts


    Please do what this message advices you to do:

    Server can’t access it’s own images. Most probably it’s a DNS problem. Please contact your hosting provider

    Your hosting provider should resolve those errors:
    “name lookup timed out”
    “Couldn’t resolve host”

    Thanks for the prompt reply.
    Unfortunately I am the hosting provider, as this site is self hosted.
    Do you have any tips on how to resolve from a hosting provider perspective?

    I too have run in to this issue, the thing is, the machine is also on of our DNS servers, it can fully resolve its own name, and other plugins on the site can use DNS just fine. A better answer would be helpful, how else are us hosts supposed to fix the issue?

    Plugin Author NextScripts


    ok. Here is some technical info.

    This WP_Error comes from simple using of WordPress built in function wp_remote_get (

    All the plugin does is it calls this function with your image URL:

    $image = wp_remote_get($imageURL);

    This function returns the image on success or WP_Error Object on failure.

    Now, please contact your WordPress admin, server admin or hosting provider and ask him to determine why the simple call of wp_remote_get returns an error.

    For me, the problem seems to have been that the server configuration forbids url_fopen calls but the fact is somehow not reflected in the ini_get(‘allow_url_fopen’) variable. Setting the allow_url_fopen to Off in the .htaccess
    php_value allow_url_fopen off
    convinced the server that fopen is not available and stopped the annoying messages. At least I did not see any for the past few hours…

    Nope. Sorry. I was in too much hurry to celebrate 🙁 The errors started again.

    The annoying thing is that there are two sites on the same server, under the same apache, running the same SNAP. One of them gives these errors while the other doesn’t. It must be some plugins or theme difference then, what else?

    Turned out that the provider’s servers are sometimes super slow. Most of the time, the hosting DNS will return an answer immediately:

    real    0m0.012s

    But sometimes, and I managed to catch it, the DNS will return very slowly. This couple of times, just over 10 seconds:

    root@wp:/etc# time nslookup
    Non-authoritative answer:
    real    0m10.010s
    user    0m0.008s
    sys     0m0.004s

    I guess that’s what causes the timeouts to happen. I think curl’s default timeout is five seconds, isn’t it? And the problem is intermittent, so it is hard to catch (and believe). Most of the time things work but sometimes they just fail unpredictably.

    So I changed my resolv.conf to use the servers of Google and OpenDNS. Hopefully, this will finally resolve the problem.

Viewing 7 replies - 1 through 7 (of 7 total)
  • The topic ‘Self-Hosted: Server can't access it's own images’ is closed to new replies.