Viewing 1 replies (of 1 total)
  • Thread Starter Pablo Pacheco

    (@karzin)

    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

Viewing 1 replies (of 1 total)

The topic ‘Error: Can´t access admin page’ is closed to new replies.