WordPress.org

Ready to get started?Download WordPress

Forums

Facebook Connect WordPress Plugin WP 2.9 (3 posts)

  1. jalmz
    Member
    Posted 4 years ago #

    hi guys,

    im having problem with my (Facebook Connect WordPress Plugin). I upgraded my wordpress to 2.9 then I cannot longger activate the Facebook Connect WordPress Plugin..

    heres the error.. Facebook Connector

    Plugin could not be activated because it triggered a fatal error.

    Fatal error: Cannot redeclare json_encode() (previously declared in /blogs/wp-includes/compat.php:128) in /blogs/wp-content/plugins/fbconnect/fbConfig_php4.php on line 143

  2. bkowalk
    Member
    Posted 4 years ago #

    Same problem--please let me know if you figure out a solution. I'll definitely post here if I find anything.

  3. bkowalk
    Member
    Posted 4 years ago #

    Got a fix if you need it--you'll need to have direct file access to your blog on your server though. In your blog directory, go to:

    /wp-content/plugins/fbconnect/

    then open the file called fbConfig_php4.php. Go down to the very end (lines 143-147). Should look like this:

    function json_encode($data){
    	require_once 'facebook-client4/classes/JSON.php';
    	$json = new Services_JSON();
    	return $json->encode($data);
    }

    We're just going to comment out this section of code so it never runs--with the wordpress 2.9 update, this section is obsolete. So, add two backslashes to the start of every line. Should look like this:

    //function json_encode($data){
    //	require_once 'facebook-client4/classes/JSON.php';
    //	$json = new Services_JSON();
    //	return $json->encode($data);
    //}

    That's it! Things should be back up and running.

Topic Closed

This topic has been closed to new replies.

About this Topic