When you post in WordPress with over 5MB text post, you may receive this error with red color. or you found in your php error log 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. Continue reading “Publishing Failed in WordPress”
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 Continue reading “An error occurred while installing mysql2 (0.5.2), and Bundler cannot continue.”
`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
File ./vendor/autoload.php missing or not readable. in centminmod phpMyAdmin
After installed the phpMyAdmin in centminmod, I saw this error message. File ./vendor/autoload.php missing or not readable. Most likely you did not run Composer to install library files. I like to fix it manually and access to my server shell and run these command. cd /usr/local/nginx/html/1111_mysqladmin12345 git pull rm -rf composer.phar wget -cnv https://getcomposer.org/composer.phar -O Continue reading “File ./vendor/autoload.php missing or not readable. in centminmod phpMyAdmin”
Create WordPress widget template from scratch
I’ve save down the most basic widget code for WordPress, you can copy this to your plugin and modify it to start your first widget. You can save time on this tutorial to help you create wordpress widget from scratch. <?php class example_widget extends WP_Widget { function __construct() { parent::__construct(false, $name = ‘Example Widget’); } Continue reading “Create WordPress widget template from scratch”
Install Tinyproxy on Centos 7
mongoexport and mongoimport with query from one host to one host
I would like to query the data that I need only from a server to another server, and I just use one line of command in linux shell mongoexport -h fromHost.com -d fromDB -c fromCollection -q ‘{ count: { $gte: 1 } }’ | mongoimport -h toHost.com -d toNewDB -c toNewCollection If your date is Continue reading “mongoexport and mongoimport with query from one host to one host”
Fast way to find duplicate data in MongoDB
I need to find out the duplicate data content in my 40 Millions records, then I can make the unique index to my name field. > db.collecton.aggregate([ … { $group : {_id : “$field_name”, total : { $sum : 1 } } }, … { $match : { total : { $gte : 2 } Continue reading “Fast way to find duplicate data in MongoDB”
ERROR: failed to ptrace(PEEKDATA) pid 17402: Input/output error (5)
You may found this error from your php-fpm and the php-fpm crash tail /var/log/php-fpm/error.log [15-May-2016 12:24:13] ERROR: failed to ptrace(PEEKDATA) pid 17402: Input/output error (5) [15-May-2016 12:24:13] ERROR: failed to ptrace(PEEKDATA) pid 17777: Input/output error (5) [15-May-2016 12:24:13] ERROR: failed to ptrace(PEEKDATA) pid 18886: Input/output error (5) [15-May-2016 12:25:53] ERROR: failed to ptrace(PEEKDATA) pid 17232: Continue reading “ERROR: failed to ptrace(PEEKDATA) pid 17402: Input/output error (5)”
How to clear nginx cache manually ?
Normally I like to do manually job. assume that the default path of your nginx cache is /var/cache/nginx This will clear all your cache in one line. Delete a single file from nginx cache If you just want to delete a single file from nginx cache, you can try this. Then it will show something Continue reading “How to clear nginx cache manually ?”
