Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

sendHttpRequest() erroneously returning "1" #1393

Closed
robocoder opened this issue May 29, 2010 · 10 comments
Closed

sendHttpRequest() erroneously returning "1" #1393

robocoder opened this issue May 29, 2010 · 10 comments
Labels
Bug For errors / faults / flaws / inconsistencies etc. Critical Indicates the severity of an issue is very critical and the issue has a very high priority.
Milestone

Comments

@robocoder
Copy link
Contributor

Three forum posters and one email to hello@piwik.org all reporting that the Piwik dashboard now says the current version available for download is "1".

@robocoder
Copy link
Contributor Author

(In [2239]) fixes #1393 - see http://bugs.php.net/39034; we now check for boolean true and set the response to an empty string to avoid the cast, i.e., (string)true == "1"

@robocoder
Copy link
Contributor Author

According to man page for curl_setopt_array(), it'll return false immediately (ignoring future options) if it encounters an option that it can't set (from the options array parameter).

@robocoder
Copy link
Contributor Author

(In [2242]) fixes #1393 - we now setopt() CURLOPT_FILE or CURLOPT_RETURNTRANSFER separately in case curl_setopt_array() failed early; we also wrap ob_start() ... ob_end_clean() around curl_exec() to protect against output leaking to browser for some other reason

@robocoder
Copy link
Contributor Author

(In [2243]) refs #1393 - I dug deeper into the libcurl source and change history, and as a result, I'm reordering the curl options based on level of support in libcurl, i.e., oldest to latest version, increasing the likelihood that all settable options are set; added some comments

@robocoder
Copy link
Contributor Author

(In [2244]) refs #1393 - and this is based on a review of ext/curl; the workaround (not yet implemented) is to parse the Location: headers manually

@mattab
Copy link
Member

mattab commented May 31, 2010

Anthon, can you confirm you tested the code when a new release is published and that it displays the version number properly + downloads the files? thanks

@robocoder
Copy link
Contributor Author

nod

@jpfleury
Copy link

I updated Piwik to version 0.6.4, and I still have this bug. In the top and to the right of the screen, it's written:

New Update: Piwik 1

and if I move the cursor over:

Piwik 1 est maintenant disponible.
Merci de mettre jour! (voir les modifications).

@robocoder
Copy link
Contributor Author

jpfle: this was fixed in 0.6.3; if you upgraded from an earlier version, then you'll have to wait up to 8 hrs for your site to re-ping our server.

You can reset it manually, e.g.,

UPDATE piwik_option SET option_value='0' WHERE option_name='UpdateCheck_LastTimeChecked';

Then refresh your dashboard.

If that doesn't work, then send me an email (anthon at piwik.org) with your phpinfo().

@jpfleury
Copy link

Replying to vipsoft:

jpfle: this was fixed in 0.6.3; if you upgraded from an earlier version, then you'll have to wait up to 8 hrs for your site to re-ping our server.

You can reset it manually, e.g.,

UPDATE piwik_option SET option_value='0' WHERE option_name='UpdateCheck_LastTimeChecked';

Then refresh your dashboard.

You're right. That was the problem. Thanks a lot.

This issue was closed.
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Bug For errors / faults / flaws / inconsistencies etc. Critical Indicates the severity of an issue is very critical and the issue has a very high priority.
Projects
None yet
Development

No branches or pull requests

3 participants