Please upgrade here. These earlier versions are no longer being updated and have security issues.
HackerOne users: Testing against this community violates our program's Terms of Service and will result in your bounty being denied.

Twitter Connect and Curl Error.

edited November 2011 in Vanilla 2.0 - 2.8
Fresh install vanilla here, and I've been getting this error whenever I tried to enable twitter plugin.

This is the error:
The addon could not be enabled because it generated a fatal error:
This plugin requires curl.

I'm not very technical and the hosting company said curl is installed on my vps. I've search everywhere on google and in this forum, and still have no idea what's going on. How do I fix this error?
Tagged:

Best Answer

  • Answer ✓
    Everything works now. A simple Google search to enable curl_exec on server control panel. After all this, feeling bad that I didn't figure out curl_exec was disabled.

    Thanks x00 for the massive helps. You're awesome, I appreciate that.

Answers

  • 422422 Developer MVP
    Check your php.ini

    The path where PHP looks for its php.ini file is built into PHP on compile time. To find out that path, use a PHP script that does a phpinfo() call. This will display a huge table of all of PHP's configuration variables. The path to php.ini can be found in the first part of that table, near the start of the page.

    you can simply create a new file (name it "phpinfo.php", for example) that contains the single line

    <?php phpinfo(); ?>

    Upload that file anywhere on your website and call it up in your browser.



    There was an error rendering this rich post.

  • you need php curl functions. Curl may well be installed.

    grep is your friend.

  • 422422 Developer MVP

    There was an error rendering this rich post.

  • x00x00 MVP
    edited November 2011
    if(function_exists(‘curl_version’))
    echo "curl enabled";

    grep is your friend.

  • edited November 2011
    Check your php.ini

    The path where PHP looks for its php.ini file is built into PHP on compile time. To find out that path, use a PHP script that does a phpinfo() call. This will display a huge table of all of PHP's configuration variables. The path to php.ini can be found in the first part of that table, near the start of the page.

    you can simply create a new file (name it "phpinfo.php", for example) that contains the single line

    <?php phpinfo(); ?>

    Upload that file anywhere on your website and call it up in your browser.



    Found and what's next?
    Test http://cleverwp.com/function-curl-php-extension-loaded/
    Where does the code goes to? Do I have to create a new php file in my web directory?
    if(function_exists(‘curl_version’))
    echo "curl enabled";
    Where do I put these codes into? Do I add that into php.ini?



  • Also, this is what I found in the Curl section:
    cURL support enabled
    cURL Information libcurl/7.15.5 OpenSSL/0.9.8b zlib/1.2.3 libidn/0.6.5

    Do I take it as it is enabled? I found a guide on creating a php file to test Curl, and it does return an array of strings.

    Not sure what I'm missing, Twitter connect still doesn't work.
  • first make sure you have the latest version of that plugin, it is one contained in this zip

    https://github.com/vanillaforums/Addons/zipball/master

    disable then enable it. Then let me know. If necessary you can disable the curl check.

    grep is your friend.

  • first make sure you have the latest version of that plugin, it is one contained in this zip

    https://github.com/vanillaforums/Addons/zipball/master

    disable then enable it. Then let me know. If necessary you can disable the curl check.
    I don't see Twitter plugin in there.
  • It seems it is only in the garden repro
    https://github.com/vanillaforums/Garden/zipball/master

    grep is your friend.

  • x00x00 MVP
    edited November 2011
    Ok it is seem there is something wrong that it is not detecting curl

    try and comment out these lines in class.twitter.plugin.php
          if (!function_exists('curl_exec')) {
    throw new Gdn_UserException('This plugin requires curl.');
    }
    like so
    //      if (!function_exists('curl_exec')) {
    // throw new Gdn_UserException('This plugin requires curl.');
    // }
    if so then php could be mis-compiled or something else that is preventing curl form working

    grep is your friend.

  • After doing that, I could get it enabled, but I tried to sign in with twitter account, after clicking on the small twitter icon and gave me a blank popup page.
  • x00x00 MVP
    edited November 2011
    have you completed
    dashboard/settings/twitter
    ?

    I honestly don't think you have full curl support otherwise curl_exec should be there.

    grep is your friend.

  • now that you mention it, after looking at the phpinfo page, I found this

    image


    Is the function disabled?
  • TimTim Operations Vanilla Staff
    Looks that way.

    Vanilla Forums COO [GitHub, Twitter, About.me]

  • yep

    you need
    curl_init
    curl_setopt
    curl_getinfo
    curl_close
    curl_exec

    grep is your friend.

  • Answer ✓
    Everything works now. A simple Google search to enable curl_exec on server control panel. After all this, feeling bad that I didn't figure out curl_exec was disabled.

    Thanks x00 for the massive helps. You're awesome, I appreciate that.
  • no worries

    grep is your friend.

Sign In or Register to comment.