Author Archive

MySQL logs at tmpfs

Tuesday, May 3rd, 2016

mysql logs at tmpfs

MySql logs at tmpfs

I updated my Ubuntu to version 16.04 recently. The update process was successfull for all products except MySQL. MySQL 5.7 finished every try to install it with error. So I had to fully uninstall the previous version of MySQL. MySQL 5.7 was installed successfully at my desktop just after that.

Good! I worked effectively a whole day with new version of Ubuntu, PHP 7.0 and MySQL 5.7.

What large surprize it was for me when I discovered next morning that MySQL service can not be started. Moreover it said nothing about the reason except:

Read the rest of this entry

Override WordPress option value

Tuesday, September 2nd, 2014

Override WordPress option

Override WordPress option

Override WordPress option value temporally or conditionally? Did you ever have such desire? Is it possible? Yes!

Thanks to the WordPress core developers team it is not only possible but even simple. The only special thing you need to know is the WordPress option name.
In order to change some WordPress option value for the user, user role, date, time, post, etc. use proposed code snippet as the starting point. The code sample below automatically replaces global WordPress administrator email admin_email option value with own email of the current user with “Administrator” role. Just insert this code to your active theme functions.php file in order it starts working:

Read the rest of this entry

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

PayPal customer feedback email – can we trust to it?

Thursday, June 26th, 2014

PayPal customer feedback email

PayPal customer feedback email

PayPal customer feedback email came today to my mailbox. First, I think that it is one of regular fake emails declared that it was sent by PayPal, but really sent from the address with the different (not paypal.com) domain – cs_surveys@paypal-customerfeedback.com in this case. I almost decided to delete this message as the tens of others similar sort of scam-fraud-etc. stuff, but after looking on the message text I got a thought that it could be a wrong decision. Let’s see, why I was thinking that way.

All we know (if you don’t, please read the text below and remember) that PayPal always:
– sends its emails from the domain paypal.com;
– sends them directly to your primary email registered at PayPal;
– starts email message from your full name;
– does not ask to input login information in any form;
– does not mask links in the message with URLs different from the URLs shown at the text.

Read the rest of this entry

WordPress 3.7 Beta – Automatic updates are coming

Sunday, October 6th, 2013

WordPress 3.7 Beta

WordPress 3.7 Beta

WordPress 3.7 Beta 1 is available for testing. Just few days ago we got WordPress 3.6.1 maintenance and security update. Did you update your WordPress site to version 3.6.1? No? This update is available from September, 16th. So it’s time to install it, sure. The list of fixes is available here.
Less than after a month of 3.6.1 release, WordPress developers team announced WordPress version 3.7 availability – October, 2013. Good speed.

The most impressive new feature included into version 3.7 is the automatic background update of WordPress core. That’s cool. You may sleep, have a good vacations, but your lovely WordPress will be always up-to-date, and all security vulnerabilities found will be fixed automatically. Fantastics which becomes the reality! But this is the one side of the coin only.

Read the rest of this entry

Hide some posts from the editors

Saturday, July 27th, 2013

Hide posts from editors

Hide posts from editors

WordPress user with the “Editor” role assigned is capable to edit any post and page. But what to do in such cases as this one?
– “For example I have a client with ‘editor’ capabilities, but I don’t want him to be able to edit the homepage and one or two other pages on the website. Mainly because they contain a lot of styling which is easily disrupted in the wrong hands.”
How to prevent your clients from ruin their site due to lack of expertise at WordPress and HTML/CSS coding?
That’s not so difficult. Get those pages and posts IDs. Copy and paste code snippet below

Read the rest of this entry

User Role Editor 4.0 Beta

Tuesday, June 25th, 2013

User Role Editor

User Role Editor

User Role Editor version 4.0 Beta is available for testing.
The changes are:

  • Added support for the “Gravity Forms” user capabilities. User Role Editor is integrated with “Gravity Forms” now and you can include “Gravity Forms” plugin capabilities to your blog user roles.
  • Full code refactoring is made. Code is fully restructured and encapsulated to PHP classes. Enhanced security is applied: internal global variables are not in use at User Role Editor anymore, WordPress global variable are used only.

Read the rest of this entry