Archive for the ‘General’ Category

Error refreshing the OAuth2 token invalid_grant

Thursday, July 10th, 2014

Google Cloud Platform OAuth

Google OAuth invalid grant

Trying server side interaction between Google App Engine and Google Compute Engine services with use of service account I stucked with this error message:

Fatal error: Uncaught exception 'Google_Auth_Exception' with message 'Error refreshing the OAuth2 token, message: '{ "error" : "invalid_grant" }'' in /includes/Google/Auth/OAuth2.php:330.

A few days of testing, experiments, “googling” Internet, and miscellaneous shamanic dances with a tambourine around “Google APIs Client Library for PHP” source code and the sample example of its usage did not allow me to make even a little step forward. Trying various variants with service-account.php (recreate service account, replacing private key file, trying other, default service account with client secret loading from JSON file) did not help and I still was on the same place with the same error. That was funny to resolve finally this issue and smile to myself, how the small mistake at very begin may cost a lot of time to fix it.

Read the rest of this entry

Long waited 2012 year Europe holiday trip

Sunday, September 2nd, 2012

Lucern 2011

Lucern 2011

Working, working, working… Coding, coding, coding…
Stop! Rest a litle, look around – there is a real life beyond the boring office and amazing, but virtual Internet. Take a minute, book hotels with a couple of clicks. Fly to old Europe. Rent a car. Visit beautiful historical places. Go for a walk. Sit at the street cafe with a cup of coffee. Enjoy with fresh mountains air and Alps nature. That was my dream for all this year and it will become reality tomorrow. Let me leave you for next 2 weeks. I take a vacation and go to my year 2012 Europe holiday trip: Germany, France, Belgium, Wiesbaden, Constanz, Paris, Mont-Seint-Michel, Gent, Brugge, Frankfurt. Go-go-go!

update_core capability for WordPress user

Sunday, August 5th, 2012

update_core capability

update_core user capability

WordPress Codex gives us nothing about update_core capability for WordPress user, except WordPress version of its appearing in the code – 3.0. I suppose according to its name, that update_core capability is used to decide, if user can update core WordPress file using built-in WordPress upgrade feature or not. What do you think?

Thoughts are just thoughts, while they are not confirmed by practice and strong experiment. Thus, I decided to check this obviouse guess, satisfy my curiosity and investigate, how and for what purpose WordPress uses update_core capability really. Result of my little investigation will be shown to you below.

Read the rest of this entry

Find WordPress plugins fast and easy

Saturday, July 28th, 2012

Find WordPress plugins from thousand others in a moment

Find WordPress plugins

A lot of people, who use WordPress, spend time searching good plugins. I’m one of them. I have a few WordPress sites and use different plugins their. Right place to search plugins is the WordPress plugins repository. It contains 24 000+ free plugins from hundreds of enthusiastic authors right now. That’s excellent. But that has a drawbacks too. Plugins developers appear and disappear. Every day new guys started new work, but some guys or girls stop it, forever. Thus the list of plugins is overwhelmed by old, outdated code, which is not compatible with the latest version of WordPress.
Did you ever meet with situation, when you searched plugin for your special need at WordPress.org, digged the Internet by hours, but without any success, and then, some time ago, you accidentally found some post about brilliant professionally made plugin, which sitted silently at WordPress plugins repository long time? Or you found that, what you need eventually, but – how many time did you spend on it?
Read the rest of this entry

WordPress 3.3.2 Security Update

Sunday, April 22nd, 2012

wordpress 3.3.2 security update

WP security update

WordPress published version 3.3.2. It is critical security update. According to WordPress Developers Blog, three external libraries included in WordPress (Plupload, SWFUpload, SWFObject) received security updates. WordPress 3.3.2 also addresses:
- Limited privilege escalation where a site administrator could deactivate network-wide plugins when running a WordPress network under particular circumstances.
- Cross-site scripting vulnerability when making URLs clickable.
- Cross-site scripting vulnerabilities in redirects after posting comments in older browsers, and when filtering URLs.
Full list of changes made in version 3.3.2 is available here.
PHP delevelpers could see changes in source code directly using this link.
If you didn’t install this update yet, consider to do it right now. It’s very important to defend your lovely blog as much as possible.
Read the rest of this entry

User Role Editor 3.5 is published

Sunday, February 19th, 2012

User Role Editor WordPress plugin version 3.5

User Role Editor v. 3.5

What’s new in version 3.5 of User Role Editor WordPress plugin?
- User Role Editor could be available now for single site administrators (Administrator role) under multi-site environment. You should define special constant in your blog wp-config.php file for that.
- One of “User Role Editor” users with 1100+ sites in the multi-site network reported that URE doesn’t update roles for all sites, but stalls somewhere in the middle. Other network update method is realized as alternative. Due to my tests it works approximately 30 times faster. If you met the same problem, try it. It will be great if you share your experience with me. But be careful. It’s recommended to make 1st try on the backup copy, not on a live site.
- Persian translation is updated.
Go to User Role Editor Change Log for details.

Support stop SOPA-PIPA movement

Thursday, January 19th, 2012

Stop censorship

Stop censorship

What amazing things are going! We are so different, large and small, thin and thick, young and old, we are so different, but all of us come together to stop SOPA-PIPA. No censorship in Internet! I got this email from fightforthefuture.org team and share it with you:
“Google launched a petition. Wikipedia voted to shut itself off. Senators’ websites went down just from the sheer surge of voters trying to write them. NYC and SF geeks had protests that packed city blocks.
You made history today: nothing like this has ever happened before. Tech companies and users teamed up. Tens of millions of people who make the internet what it is joined together to defend their freedoms. The free network defended itself. Whatever you call it, the bottom line is clear: from today forward, it will be much harder to mess up the internet.
The really crazy part? We might even win.
Approaching Monday’s crucial Senate vote there are now 35 Senators publicly opposing PIPA. Last week there were 5. And it just takes just 41 solid “no” votes to permanently stall PIPA (and SOPA) in the Senate. What seemed like miles away a few weeks ago is now within reach.
But don’t trust predictions. The forces behind SOPA & PIPA (mostly movie companies) can make small changes to these bills until they know they have the votes to pass. Members of Congress know SOPA & PIPA are unpopular, but they don’t understand why–so they’re easily duped by superficial changes.
The Senate returns next week, and the next few days are critical.
Read the rest of this entry