• I’m running the most recent WP install and everything is updated on the plug in side. I’ve followed otto’s instructions on creating the Facebook app.

    The first of two problems I’m having is that under “settings” in my dashboard, the SFC link just comes up mostly blank:

    Simple Facebook Connect
    Options relating to the Simple Facebook Connect plugins.

    Main Settings

    That’s it, nothing more shows up.

    Everything else on the page is missing as if there’s an error in some php script or something.

    This happened after I saved the page upon setting up the basics settings but before I installed the other SFC plugins. Now I’m unable to go back and change any setting if I ever needed to.

    #2 problem – the “SFC – User Status Widget” kills the widget page the same way as the main page is missing. It loads everything so far then stops before it loads the bottom of the page and the widget sidebars area.

    I have uninstalled and reinstalled this plugin twice and I still get the same thing…

Viewing 7 replies - 1 through 7 (of 7 total)
  • I just installed SFC and after I entered my settings I got the same thing. I get ‘Main Settings’ and that’s it.

    OK, I traced through the code and we’re dying here in sfc-base.php:

    function sfc_section_text() {
            $options = get_option('sfc_options');
            if (empty($options['api_key']) || empty($options['app_secret']) || empty($options['appid'])) {

    If all three of those are defined, then we fall through to the ‘else’:

    } else {
    
                    // load facebook platform
                    include_once 'facebook-platform/facebook.php';
                    $fb=new Facebook($options['api_key'], $options['app_secret']);
    
                    $error = false;
    
                    try {
                    $a = $fb->api_client->admin_getAppProperties(array('connect_url'));
                    } catch (Exception $e) {
                        // bad API key or secret or something
                        $error=true;
                                    echo '<p class="error">'.__('Facebook doesn\'t like your settings, it says:', 'sfc').' ' . $e->getMessage() . '.</p>';
                    }

    I suspect the connection to the FB API is failing, but the plug-in isn’t showing us the error, and is just dying…

    Yep, it is failing right here:

    $a = $fb->api_client->admin_getAppProperties(array('connect_url'));

    Doing more digging, here’s the problem, in facebookapi_php5_restlib.php:

    protected function convert_xml_to_result($xml, $method, $params) {
         $sxml = simplexml_load_string($xml);

    And my server logs concur:
    PHP Fatal error: Call to undefined function simplexml_load_string() in /path/wordpress/wp-content/plugins/simple-facebook-connect/facebook-platform/facebookapi_php5_restlib.php on line 3216, referer: https://www.gizmolovers.com/wordpress/wp-admin/plugins.php?activate=true&plugin_status=all&paged=1&s=

    simplexml_load_string isn’t defined anywhere. But it should be built in – my server is running PHP 5.3.5 and this should be standard in PHP5. I’m going to ping my server admins…

    Ah – try ‘php -m’ on your server and see if SimpleXML is loaded. In my case it looks like PHP is unhappy.

    php -m
    PHP Warning:  PHP Startup: Unable to load dynamic library '/usr/local/lib/php/20090626/pcre.so' - Cannot open "/usr/local/lib/php/20090626/pcre.so" in Unknown on line 0
    PHP Warning:  PHP Startup: Unable to load dynamic library '/usr/local/lib/php/20090626/fileinfo.so' - Cannot open "/usr/local/lib/php/20090626/fileinfo.so" in Unknown on line 0
    PHP Warning:  PHP Startup: Unable to load dynamic library '/usr/local/lib/php/20090626/imap.so' - Cannot open "/usr/local/lib/php/20090626/imap.so" in Unknown on line 0
    PHP Warning:  PHP Startup: Unable to load dynamic library '/usr/local/lib/php/20090626/pcre.so' - Cannot open "/usr/local/lib/php/20090626/pcre.so" in Unknown on line 0
    PHP Warning:  PHP Startup: Unable to load dynamic library '/usr/local/lib/php/20090626/simplexml.so' - Cannot open "/usr/local/lib/php/20090626/simplexml.so" in Unknown on line 0
    PHP Warning:  PHP Startup: Unable to load dynamic library '/usr/local/lib/php/20090626/spl.so' - Cannot open "/usr/local/lib/php/20090626/spl.so" in Unknown on line 0
    PHP Warning:  PHP Startup: Unable to load dynamic library '/usr/local/lib/php/20090626/filter.so' - Cannot open "/usr/local/lib/php/20090626/filter.so" in Unknown on line 0
    PHP Warning:  PHP Startup: Unable to load dynamic library '/usr/local/lib/php/20090626/hash.so' - Cannot open "/usr/local/lib/php/20090626/hash.so" in Unknown on line 0
    PHP Warning:  PHP Startup: Unable to load dynamic library '/usr/local/lib/php/20090626/json.so' - Cannot open "/usr/local/lib/php/20090626/json.so" in Unknown on line 0
    PHP Warning:  PHP Startup: Unable to load dynamic library '/usr/local/lib/php/20090626/pdf.so' - Cannot open "/usr/local/lib/php/20090626/pdf.so" in Unknown on line 0
    PHP Warning:  Module 'ctype' already loaded in Unknown on line 0
    PHP Warning:  Module 'dom' already loaded in Unknown on line 0

    That’d explain why I can’t use SimpleXML currently…

    Thread Starter Frank Shrum

    (@frankshrum)

    Ok when I went to my error log I found this::: [30-May-2011 05:45:22] PHP Fatal error: Cannot redeclare class Facebook in /home/ebizzba/public_html/videos/wp-content/plugins/simple-facebook-connect/facebook-platform/facebook.php on line 37

    Sorry but I do not know how to run the ‘php -m’ as I am just a copy and paste hack and do not know how to program in php or work on servers so I’m not much help to you, probably.

    OK, that error means you have two things defining a function named ‘Facebook’, and you can’t have the same function defined twice. Do you have another Facebook related plugin?

    I’d recommend disabling all of your other plugins, and trying just this one plugin. If the error goes away start activating your other plugins one by one, testing after each, until you find the one that conflicts.

    If it *doesn’t* work with just this plugin, something odd is going on. Try completely removing the plugin and reinstalling. If it still fails I suspect your server loads something by default which defines a function called ‘Facebook’.

    Thread Starter Frank Shrum

    (@frankshrum)

    That did it!!! I disabled the “Facebook Comments for WordPress” plugin and it started working correctly.

    Thanks for this.

    No problem. Glad it is working for you.

Viewing 7 replies - 1 through 7 (of 7 total)
  • The topic ‘Simple Facebook Connect – Missing Settings Page’ is closed to new replies.