WordPress.org

Forums

Error when activating Facebook plugin (2 posts)

  1. chrischickenwire
    Member
    Posted 4 years ago #

    Hi there,

    I'm trying to use a plugin that puts a Facebook like button on all posts.

    When I activate the plugin it comes up with this error:

    Warning: curl_setopt() [function.curl-setopt]: CURLOPT_FOLLOWLOCATION cannot be activated when in safe_mode or an open_basedir is set in /home/rjtonlin/public_html/wp/wp-content/plugins/facebook-like-button/inc/get_key.php on line 12

    Warning: curl_setopt() [function.curl-setopt]: CURLOPT_FOLLOWLOCATION cannot be activated when in safe_mode or an open_basedir is set in /home/rjtonlin/public_html/wp/wp-content/plugins/facebook-like-button/inc/get_key.php on line 13

    Any idea why this would be, or how to fix it?

  2. ehudeli
    Member
    Posted 4 years ago #

    Replace both troubled lines 12/13 with

    $ch = curl_init();
    if(!ini_get('safe_mode') && !ini_get("open_basedir")) {
    curl_setopt($ch, CURLOPT_FOLLOWLOCATION, true);
    }

Topic Closed

This topic has been closed to new replies.

About this Topic