Currently Viewing Posts Tagged how-to

Hot to fix the problem on the new installation MariaDB

After the installation of MySQL server or MariaDB on Ubuntu, I would like to use phpMyAdmin or Adminer to access the MySQL server. But the first time the error comes like below.

Access denied for user ‘root’@’localhost’

mysqli_real_connect(): (HY000/1698): Access denied for user ‘root’@’localhost’

MySQL connect error on phpMyAdmin

 

MySQL connect error on Adminer

Here is the solution to make the root connect to a server without error.

Continue reading “Hot to fix the problem on the new installation MariaDB”

OneDrive could not launch on Windows 10

It said: This application failed to start because it could not find or load the Qt platform plugin “windows” in “”. Reinstalling the application may fix this problem.

My current Windows 10 is version 1703, OS build 15063.674.

I knew OneDrive is the builtin with Windows 10. It can not be uninstall like a normal program.

Continue reading “OneDrive could not launch on Windows 10”

Bashrc is not loading? (Fixed)

I have the .bashrc file, but it is not loading when I connect my VPS through SSH.

The content of .bashrc looks like below:

alias ls='ls --color=auto'
force_color_prompt=yes
PS1='\[\033[1;36m\]\u\[\033[1;31m\]@\[\033[1;32m\]\h:\[\033[1;35m\]\w\[\033[1;31m\]\$\[\033[0m\] '

It provides a colorful terminal look.

How to fix the problem of .bashrc not loading?

Continue reading “Bashrc is not loading? (Fixed)”

How to connect DBF file and read data by PHP script

Afte last post, my php-fpm support the dbase database file now.  Here is an example php script.

$db = dbase_open('../db/clients.dbf',0);

if ($db){
	$record_numbers = dbase_numrecords($db);
	
	for ($i = 1; $i <= $record_numbers; $i++) {
		  $row = dbase_get_record_with_names($db, $i);
		  if ( strpos(trim($row['CLIENTNAME']), $clientname)  !== FALSE and $row['deleted'] != 1) {
			  	$clientid =  $row['CLIENTID']);
				
				echo 'Customer ID Number: ',$clientid,';
                 }
     }
}

0) The dbase file has two columns, one is CLIENTID, the other one is CLIENTNAME.

1) Open the dbase file, clients.dbf,  by relative path.

2) If the dbf file exists, get the total number of records.

3) Go through all records. If field CLIENTNAME is same as the variable, $clientname,  print client id.

Install dbase extension on php7, Ubuntu 16.04

I followed the instruction mostly based on mote0230 github.

Please be noticed that updating (and probably inserting) with arrays that contain named indexes, is not working. For my project, it is OK. I just need to read the data from dbf files.

dbase-pecl-php7

# PHP 7
sudo add-apt-repository ppa:ondrej/php
sudo apt-get install php7.0-fpm php7.0-curl php7.0-mysql php7.0-dev 

Compile

# dbase for PHP 7
git clone git://github.com/mote0230/dbase-pecl-php7.git ~/php7-dbase
cd php7-dbase/
phpize
./configure
make
sudo make install
cd ~
rm -rf ~/php7-dbase

Continue reading “Install dbase extension on php7, Ubuntu 16.04”

iTunes Installation error on Windows 10

When I re-install iTunes on my Windows 10, after reset my PC, I got the error as below: iTunes Installation error: “Microsoft VC80.CRT.TYPE=”win 32″.version=8.0.50727.6195″.publicKeyToken=’1fc8b3b9a1e18e3b”.processorArchitecture “x86″”.Please refer to help and support for more information. HRESULT:0X800700C1

It annoied my half an hour to solve the problem. At last, I got the answer.

My Windows 10 may need a particular library file which is not included. It is Microsoft Visual C++ 2005 Service Pack 1 Redistributable Package MFC security Update.

Download here Microsoft Visual C++ 2005 Service Pack 1 Redistributable Package MFC Security Update

I download and install the x64 file. Then re-try the installation of iTunes, it is OK now. No Error comes out.

 

[Fixed] OBi110 is not working with Google Voice

Just a few days ago, my OBi110 device does not work with my Google Voice. I can not dial out, and no incoming call, until today, I fixed it.

Sometimes it said some configuration error. I sign in my OBiTalk account at https://www.obitalk.com/obinet/

Normally, the device OBi110 can do the firmware update through the OBiTalk account dashboard. but it did not work this time.

When I sign in my account, then go to the device configuration page. I can setup Google Voice account by clicking the gear icon beside the account. But, now it is shown a warning or error without setup.

obi110-not-updateThe error displayed is Authentication error.

Now, let me show you haw to fix this error. the most important part is to upgrade the firmware of the device.

The latest firmware is 1-3-0-2886, the current one on my OBi110 is 1.3.0 – 2872

Continue reading “[Fixed] OBi110 is not working with Google Voice”

How to fix error Age of Empires 3 in Windows 10

It is an error when I tried to play my Age of Empires III game in Windows 10. I have the game which is installed on Steam platform. It is an old game, which is released  11 years ago, or 2005. I played it on Windows XP, Windows 2000, and Windows 7. Now I installed it on Windows 10. It gave me an error and closed.

I checked and fixed the error with two steps.

Step 1. The error of compatible mode.

I located the executive files and change the properties. age3y.exe

It is located on Steam library. Mine is D:\steam-games. So the files are in d:\steam-games\steamapps\common\age of empires 3\bin\

Right click on the file and choose properties, click Compatibility tab, make sure choose Windows XP (Service Pack 3) Compatibility mode and choose Run this program as an administrator.

aoe3-compatibility-mode Continue reading “How to fix error Age of Empires 3 in Windows 10”

How to convert flac file to MP3 with FormatFactory

I use FormatFactory 3.8.0 to convert video files, audio files. It can also convert picture, such as jpg png ico, bmp, gif, tif, pcx, tga; and document, such as pdf, html mobi, EPub, AZW3.

Here I am talking about how to convert audio file, which is flac. I would like to convert it to mp3 and import it to iTunes. At the last, I will play it on my iPod shuffle.

The problem is I got the error 0x00000001.

flac2mp3-error

I have no idea what happened. Since FormatFactory gave the option to convert flac to mp3, why it can not do it.

Continue reading “How to convert flac file to MP3 with FormatFactory”

Post your new Blog post notice on Facebook from MovableType

I have a blog which is powered by MovableType.

Everyone use facebook, almost everyone. I think to put a notice on Facebook when I have new post on my Blog is a good idea. So I did a search and finally found this one, FBWallPost.

FBWallPost is build by the same author of PostTwiOauth.

PostTwiOauth is another plugin for MovableType, which is used to publish a tweet on twitter when a new blog post published.

FBWallPost can do the same job, but on Facebook.

The latest version of FBWallPost is v 0.17.

My experience of it is as below:

  • MovableType 6.2.2.
  • Facebook API 2.5

fbwallpost-settings

Continue reading “Post your new Blog post notice on Facebook from MovableType”

  • Archives