0

The plugin i'm talking about is facebook-comments-plugin

The problem is i can´t access admin page: /wp-admin/options-general.php?page=fbcomments

This error is happening:

PHP Warning: DOMDocument::load() [domdocument.load]: URL file-access is disabled in the server configuration in E:\home\intothebac\Web\wp-content\plugins\facebook-comments-plugin\class-admin.php on line 194 PHP Warning: DOMDocument::load(http://www.facebook.com/translations/FacebookLocales.xml) [domdocument.load]: failed to open stream: no suitable wrapper could be found in E:\home\intothebac\Web\wp-content\plugins\facebook-comments-plugin\class-admin.php on line 194 PHP Warning: DOMDocument::load() [domdocument.load]: I/O warning : failed to load external entity "http://www.facebook.com/translations/FacebookLocales.xml" in E:\home\intothebac\Web\wp-content\plugins\facebook-comments-plugin\class-admin.php on line 194

1 Answer 1

1

I had to change the plugin file to make it work. I think it can help someone and even the plugin's author should consider making these changes.

on class-admin.php, create this function at the beggining (can be line 9):

function loadXmlByCurl($url){ $ch = curl_init(); curl_setopt($ch, CURLOPT_URL, $url); curl_setopt($ch, CURLOPT_HEADER, false); curl_setopt($ch, CURLOPT_RETURNTRANSFER, true); $xml = curl_exec($ch); curl_close($ch); $xml = new SimpleXMLElement($xml); return $xml; } 

Now replace this line

$dom_object->load("http://www.facebook.com/translations/FacebookLocales.xml"); 

by

$xml = loadXmlByCurl("http://www.facebook.com/translations/FacebookLocales.xml"); $dom_object = dom_import_simplexml($xml)->ownerDocument; 

and you are ready to go.

Start asking to get answers

Find the answer to your question by asking.

Ask question

Explore related questions

See similar questions with these tags.