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/
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"}
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.
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.
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
Sorry, got your post above only now. Did I do what you wanted me to do? Or still need to try?
ok, thanks, please include the follwing line before the curl_exec
curl_setopt ($ch, CURLOPT_CERTINFO, false) ;
curl_setopt ($ch, CURLOPT_SSL_VERIFYPEER, false) ;
curl 7.10 apparently has other default values than versions before
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?
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;
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?
If this is the only yellow line, modify line 114 in flattr.php to
$retval["result"] = PASS;
Now it continues, but after registering the application and entering key and secret, it keeps on validating.
might be the same issue with curl close, let me look into it
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>
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
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.
Please replace __DIR__ with
dirname(__FILE__)
in flattr_client.php
Try changing
static::parseResponse
to
self::parseResponse
in wp-content/plugins/flattr/lib/oauth2client.php on line 142
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.
did you start over? If not, please try.
yes, started over twice - no change
Could you test if post submission works nevertheless?
I unpublished and republished a post that does not yet have a thing on Flattr. So far I cannot confirm that it was created.
It only works on NEW posts.
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() ?>
this one is allready known and will be fixed in the next update
ok, I used the fix provided in the other thread. So at least the buttons are back.
ok, I'll be offline now. I can still try some fixes if you have new ideas.
Thank you for your help!