Why You Should Never Ever Buy XiaoMi Products ?

I’m not happy with their product, that’s why I write this article to let you know the service and the service policy of their product.
If you are using their product and is working fine, then you are good luck. If there is any problem with their product, you are in big trouble.

For personally, I do not like this brand, but I gave them a chance to try. I bought the model XiaoMi Mi A1 64GB Black on 11 November 2017 at IT City Fashion Island. Since this is the first Android One product from them, I use this for test for my APP development.
Most of the time I just put the phone on my office table and seldom use it unless I update and test for my APP.

Last week, 11 Feb 2019, I found out that the phone cover broken up, and I make a closer look and saw that is the battery expend the size and push the cover up. I’m feel lucky because the battery not yet explode.
So, I try to find out where is their service center. I found out that they do not have any official service center in here, so I have to take it back to the place that I purchase the phone for the service.

That time I passed to them, the LCD screen is still workable and the staff there turn off it and check it, and told me just need to change the battery. Then he charge me for 482 Baht. I thought it is the battery price at first.

So I provide the screenshots for the conversation, let you know what is going on.

Some people said that it is reseller problem, but before that I’ve contacted the Service Company that listed in Xiao Mi Website, https://www.mi.com/th/support/repair/
They told me IT City is a drop point and will send to them for service.

Why I didn’t go to the service company directly ? First you need to understand the working hour traffics in Bangkok is terrible.
The location of the VST ECS is far from my place, around 30KM, and the IT City is just 10KM from my place, sure I chose to take to the drop point.

Conclusion

  • No matter they fix your phone or not, you will get charged, this is their policy.
  • The battery maybe explode after a year of using period.
  • They do not have official service center in here.
  • They want to charge you more and ask you change for the LCD.
  • If you never contact them, they will just put you aside until you contact them, they will never call you.
  • Their service is slow, it can take 2 weeks and 2 weeks.

How to disable AutoSave in WordPress ?

Sometimes we do not need the auto save function in the editor in WordPress, it will increase your database or slow down you editing experience while you are in slow internet connection.

Here is the solution to disable it, if you need to re-enable it just comment them away.

define( 'AUTOSAVE_INTERVAL', 60*60*60*24*365 ); // Set autosave interval to a year
define( 'EMPTY_TRASH_DAYS',  0 ); // Empty trash now: Zero days
define( 'WP_POST_REVISIONS', false ); // Do not save any revisions

Publishing Failed in WordPress

When you post in WordPress with over 5MB text post, you may receive this error with red color.

Publishing Failed

or you found in your php error log

PHP Fatal error:  Maximum execution time of 60 seconds exceeded in /home/nginx/domains/juzhax.com/public/wp-includes/formatting.php on line 2295

This is because WordPress need more time to execute and process and formatting your post over the maximum execution time.

You may use the way below to solve this.

Edit the file wp-config.php and add in the line


@ini_set('max_execution_time', 1800);

But, use this with caution, because if many of your script in WordPress over this time, this way maybe kill your server.

An error occurred while installing mysql2 (0.5.2), and Bundler cannot continue.

Gem files will remain installed in /var/www/discourse/vendor/bundle/ruby/2.5.0/gems/mysql2-0.5.2 for inspection.
Results logged to /var/www/discourse/vendor/bundle/ruby/2.5.0/extensions/x86_64-linux/2.5.0-static/mysql2-0.5.2/gem_make.out
An error occurred while installing mysql2 (0.5.2), and Bundler cannot continue.
Make sure that gem install mysql2 -v '0.5.2' --source 'https://rubygems.org/' succeeds before bundling.
In Gemfile:
mysql2

I found the best way to solve the problem.

I think that you may missing the dev library of mysql:

On ubuntu

sudo apt-get install libmysqlclient-dev

On Red Hat/CentOS and other distributions using yum:

sudo yum install mysql-devel

On Mac OS X with Homebrew:

brew install mysql

`require’: cannot load such file — php_serialize (LoadError)

I’m running some of the Ruby script inside Docker and it show me this error.

The solution I use to solve it using the way below.

First, goto the path of your Gemfile

echo “gem ‘php-serialize'” >>Gemfile
bundle install