WordPress.org

Ready to get started?Download WordPress

Forums

Flattr
Capabilities check freezes up (31 posts)

  1. Chris
    Member
    Posted 2 years ago #

    Trying the authorization wizard with version 0.99.1

    Running server capabilities check
    checking cURL curl_init
    checking oAuth OAuth2Client
    checking php 5.2.17
    checking WordPress 3.3.1
    checking Flattr ...

    There it stops. I can only click "Cancel". The same happens with 2 installations on different servers (shared webhosting).
    Does it mean that the Flattr website is down?
    Thanks!

    http://wordpress.org/extend/plugins/flattr/

  2. Michael Henke
    Member
    Plugin Author

    Posted 2 years ago #

    Try opening http://localhost/wp-admin/admin.php?q=Flattr&flattrJAX=true&page=flattr%2Fflattr.php where you replace localhost with your blogs domain name of course, what is the result?
    If it works, it should return something like this:

    {"result":"passed","feature":"Flattr","text":"connection established"}

  3. Chris
    Member
    Posted 2 years ago #

    It returns on both servers:

    Warning: curl_error(): 214 is not a valid cURL handle resource in /blablabla/wp-content/plugins/flattr/flattr.php on line 148
    {"result":"failed","feature":"Flattr","text":false}

    The number 214 sometimes changes.

  4. Michael Henke
    Member
    Plugin Author

    Posted 2 years ago #

    If you can, please replace lines 136 to 150 (from case "Flattr" to break; in flattr.php with the following lines:

    case "Flattr" :
    $retval["text"] = "Flattr API v2";

    $ch = curl_init ('https://api.flattr.com/rest/v2/users/der_michael');
    curl_setopt ($ch, CURLOPT_RETURNTRANSFER, 1) ;
    $res = curl_exec ($ch) ;
    $res = json_decode($res);
    if (isset($res->type)) {
    $retval["text"] = "connection established";
    $retval["result"] = PASS;
    } else {
    $retval["text"] = "curl connection error ".curl_error($ch);
    }
    curl_close ($ch) ;
    break;

    and then check again please.

  5. Chris
    Member
    Posted 2 years ago #

    Did one more experiment: I moved the
    curl_close ($ch) ;
    from line 142 to line 150. Trying the wizard now gives me a changed result:

    checking cURL curl_init
    checking oAuth OAuth2Client
    checking php 5.2.17
    checking WordPress 3.3.1
    checking Flattr SSL certificate problem, verify that the CA cert is OK. Details: error:14090086:SSL routines:SSL3_GET_SERVER_CERTIFICATE:certificate verify failed

  6. Chris
    Member
    Posted 2 years ago #

    Sorry, got your post above only now. Did I do what you wanted me to do? Or still need to try?

  7. Michael Henke
    Member
    Plugin Author

    Posted 2 years ago #

    ok, thanks, please include the follwing line before the curl_exec

    curl_setopt ($ch, CURLOPT_CERTINFO, false) ;
    curl_setopt ($ch, CURLOPT_SSL_VERIFYPEER, false) ;

  8. Michael Henke
    Member
    Plugin Author

    Posted 2 years ago #

    curl 7.10 apparently has other default values than versions before

  9. Chris
    Member
    Posted 2 years ago #

    The Wizard freezes again. I try the direct link, it tells me:

    Warning: curl_setopt() [function.curl-setopt]: Invalid curl configuration option in /mnt/web5/51/50/5346950/htdocs/divneveci/wp-content/plugins/flattr/flattr.php on line 142
    {"result":"passed","feature":"Flattr","text":"connection established"}

    So I remove the line with "CURLOPT_CERTINFO", now the wizard works (tried on both blogs), Flattr shows: "connection established".

    The buttons don't change after all tests are done - is the wizard completed?

  10. Michael Henke
    Member
    Plugin Author

    Posted 2 years ago #

    If all results return green, the wizard can continue, if you have a yellow or red result, the wizard will not continue. Your PHP check is yellow, right? If this is the only yellow line, modify line 114 in flattr.php to

    $retval["result"] = PASS;

  11. Chris
    Member
    Posted 2 years ago #

    Yes, the PHP version is yellow. I cannot upgrade PHP, my provider has the exclusive power in these things.
    What is the minimum PHP version?

  12. Michael Henke
    Member
    Plugin Author

    Posted 2 years ago #

    If this is the only yellow line, modify line 114 in flattr.php to

    $retval["result"] = PASS;

  13. Chris
    Member
    Posted 2 years ago #

    Now it continues, but after registering the application and entering key and secret, it keeps on validating.

  14. Michael Henke
    Member
    Plugin Author

    Posted 2 years ago #

    might be the same issue with curl close, let me look into it

  15. Michael Henke
    Member
    Plugin Author

    Posted 2 years ago #

    Please open the following url, what is the result? replace the <values> according to your setup:

    http://<hostname>/wp-admin/admin.php?flattrJAX=true&page=flattr%2Fflattr.php&flattrss_api_key=<key>&flattrss_api_secret=<secret>

  16. Chris
    Member
    Posted 2 years ago #

    Warning: require_once(__DIR__/lib/httpconnection.php) [function.require-once]: failed to open stream: No such file or directory in /blablabla/wp-content/plugins/flattr/flattr_client.php on line 2

    Fatal error: require_once() [function.require]: Failed opening required '__DIR__/lib/httpconnection.php' (include_path='.:/opt/RZphp52/includes') in /blablabla/wp-content/plugins/flattr/flattr_client.php on line 2

  17. Chris
    Member
    Posted 2 years ago #

    PS: If I add now in flattr_client.php

    if ( !defined('__DIR__') ) define('__DIR__', dirname(__FILE__));

    to overcome this problem, it stops with the message (when entering the direct link)

    Parse error: syntax error, unexpected T_STATIC in /blablabla/wp-content/plugins/flattr/lib/oauth2client.php on line 142

    Seems to be a problem with the PHP version.

  18. Michael Henke
    Member
    Plugin Author

    Posted 2 years ago #

    Please replace __DIR__ with

    dirname(__FILE__)

    in flattr_client.php

  19. Chris
    Member
    Posted 2 years ago #

    see above

  20. Michael Henke
    Member
    Plugin Author

    Posted 2 years ago #

    Try changing
    static::parseResponse

    to

    self::parseResponse

    in wp-content/plugins/flattr/lib/oauth2client.php on line 142

  21. Chris
    Member
    Posted 2 years ago #

    OK, now it continues, I can authorize at Flattr.
    The link with key and secret return now:

    {"result":0,"result_text":"https:\/\/flattr.com\/oauth\/authorize?client_id=xxxxxxxxxxxx&response_type=code&redirect_uri=http%3A%2F%2Fwww.example.com%2Fwp-admin%2Fadmin.php%3Fpage%3Dflattr%2Fflattr.php&scope=thing+flattr"}

    The wizard shows me:

    If this is your name and avatar authentication was successfull.
    If the name displayed and avatar do not match start over.
    You need to authorize your blog once only!

    There is, however, no name or avatar displayed.

  22. Michael Henke
    Member
    Plugin Author

    Posted 2 years ago #

    did you start over? If not, please try.

  23. Chris
    Member
    Posted 2 years ago #

    yes, started over twice - no change

  24. Michael Henke
    Member
    Plugin Author

    Posted 2 years ago #

    Could you test if post submission works nevertheless?

  25. Chris
    Member
    Posted 2 years ago #

    I unpublished and republished a post that does not yet have a thing on Flattr. So far I cannot confirm that it was created.

  26. Michael Henke
    Member
    Plugin Author

    Posted 2 years ago #

    It only works on NEW posts.

  27. Chris
    Member
    Posted 2 years ago #

    Created a new test post, published it - it's not on Flattr.

    BTW, I noticed now that also the buttons don't work.

    <?php the_flattr_permalink() ?>

    leads to the fatal error:

    Call to undefined function the_flattr_permalink()
    <?php the_flattr_permalink() ?>

  28. Michael Henke
    Member
    Plugin Author

    Posted 2 years ago #

    this one is allready known and will be fixed in the next update

  29. Chris
    Member
    Posted 2 years ago #

    ok, I used the fix provided in the other thread. So at least the buttons are back.

  30. Chris
    Member
    Posted 2 years ago #

    ok, I'll be offline now. I can still try some fixes if you have new ideas.
    Thank you for your help!

Topic Closed

This topic has been closed to new replies.

About this Plugin

About this Topic

Tags