Support » Plugin: Facebook Share Statistics » PHP problem (URL File Access)

  • Resolved ivalegre


    I have a problem when opening FB share statistics:
    I get this:

    Warning: simplexml_load_file() [function.simplexml-load-file]: URL file-access is disabled in the server configuration in /homepages/***/htdocs/wp-content/plugins/facebook-share-statistics/facebook-share-statistics.php on line 110
    Warning: simplexml_load_file(,,,,,,,,,,,,,,,,,) [function.simplexml-load-file]: I/O warning : failed to load external entity ",,,,,,,,,,,,,,,http% in /homepages/5/***/htdocs/wp-content/plugins/facebook-share-statistics/facebook-share-statistics.php on line 110

    I’ve tried to make a php.ini file with:


    But still not working. There is any advice or solution to solve this?

    Thank you in advance

Viewing 1 replies (of 1 total)
  • I answer myself. I’ve tried to modify a little bit the plugin to make it work in my hosting (1and1).

    The url request was made using simplexml_load_file, but I don’t know why it’s not working in my site. To avoid this problem, the only thing necessary is change the line 110 of the plugin:

    $xml = simplexml_load_file( '' . $sUrls );


    $juliUrl = '' . $sUrls ;
    		$ch = curl_init();
    		curl_setopt($ch, CURLOPT_URL, $juliUrl);
    		curl_setopt($ch, CURLOPT_HEADER, false);
    		curl_setopt($ch, CURLOPT_RETURNTRANSFER, true);
    		$xml = curl_exec($ch);
    		$xml = new SimpleXMLElement($xml);

    With this it works in my site 🙂

Viewing 1 replies (of 1 total)
  • The topic ‘PHP problem (URL File Access)’ is closed to new replies.