• I am getting this error in wordpress while placing any text widget or inserting ant php code in widget .

    Warning: fsockopen() has been disabled for security reasons in /www/vndv.com/u/b/e/ubertech/htdocs/wp-includes/class-snoopy.php on line 1142

    can you mark out the error !!

Viewing 2 replies - 1 through 2 (of 2 total)
  • only your host can allow this action – speak with them

    Yes, this is a pain. it means your host has probably decided it is a security threat and turned it off.

    At least that is what my host has told me.

    This is what they suggested:

    We have disabled allow_url_fopen  php configuration  on the server due to its hacking vulnerabilities, very few applications require it, and by disabling it we  will prevent exploitation of PHP remote include vulnerabilities.

    Applications that do require it can be modified to use cURL instead.

    Please contact your developer and modify the code in your filename.php as follows.

    Instead of:

    $file_contents = file_get_contents(‘http://example.com/ ‘);
    // display file
    echo $file_contents;
    ?>

    Use this:

    $ch = curl_init();
    $timeout = 5; // set to zero for no timeout
    curl_setopt ($ch, CURLOPT_URL, ‘http://example.com ‘);
    curl_setopt ($ch, CURLOPT_RETURNTRANSFER, 1);
    curl_setopt ($ch, CURLOPT_CONNECTTIMEOUT, $timeout);
    $file_contents = curl_exec($ch);
    curl_close($ch);
    // display file
    echo $file_contents;
    ?>

    If anyone knows what that means and on which file to make these changes please post here.

Viewing 2 replies - 1 through 2 (of 2 total)

The topic ‘Getting fsockopen error in wordpress 2.8’ is closed to new replies.