WordPress.org

Support

Support » Plugins and Hacks » [Plugin: Youtube Channel Plugin] Error when creating page

[Plugin: Youtube Channel Plugin] Error when creating page

Viewing 2 replies - 1 through 2 (of 2 total)
  • I am also getting this error…did you ever find a solution?

    Hi, I had the same error.
    You probably have fopen disabled on your hosting…

    To fix this, open youtubechanel.php and fix these lines:

    Find function function xml2array($url, $get_attributes = 1, $priority = ‘tag’)
    Comment this:

    /*  if (!($fp = @ fopen($url, 'r')))
        {
            return array ();
        } */

    And just after those lines add this:

    $ch = curl_init();
    $timeout = 0;
    curl_setopt ($ch, CURLOPT_URL, $url);
    curl_setopt ($ch, CURLOPT_RETURNTRANSFER, 1);
    curl_setopt ($ch, CURLOPT_CONNECTTIMEOUT, $timeout);
    $file_contents = curl_exec($ch);
    curl_close($ch);

    Next, comment this:

    /*while (!feof($fp))
        {
            $contents .= fread($fp, 8192);
        }
        fclose($fp);  */

    And it should be working now.

Viewing 2 replies - 1 through 2 (of 2 total)
  • The topic ‘[Plugin: Youtube Channel Plugin] Error when creating page’ is closed to new replies.