2016年11月14日 星期一

[Solved] phpmyadmin error during installation “Empty value for 'port' specified.”

This SOLUTION is coming from "http://stackoverflow.com/questions/37089568/phpmyadmin-error-during-installation-empty-value-for-port-specified" by "William Ardila".

[SOLUTION]
My machine configuration - Ubuntu 16.04 - MySql 5.7.13 - PHP 7.0.8 - Apache 2.4.18

Step 01:
Edit the file /etc/dbconfig-common/phpmyadmin.conf, changing dbc_dbport='' to dbc_dbport='0'

Step 02:
After edit the file and save it, if you are still on the dbconfig-common wizard select 'retry', if not run sudo dpkg-reconfigure phpmyadmin (choose 'Yes' when ask you if you want to Reinstall database for phpmyadmin), and continue normally without change any value, if you want change some value, do it in the file that you edit before.

Step 03:
When configuration window asks what you want to do with existing configuration file, choose 'Keep the local version currently installed'.

In this point you can check the differences and only must exist the ones that you made in the file.

[Solved] VNC authentication failure after upgrade UBUTNU to 16.04

This solution is from "http://superuser.com/questions/438024/vnc-authentication-failure" answered by "PleaseStand":

VNC uses a separate password system. It does not check passwords against /etc/passwd but rather against ~/.vnc/passwd, which contains a single primary password and optionally a secondary password that allows only viewing the screen.

To set your VNC password(s), use the "vncpasswd" command. VNC passwords must be between five and eight characters in length – characters beyond the eighth are silently ignored. So if you are using VNC over the Internet, pick a strong, random password, as attackers may use botnets that have numerous IP addresses to circumvent the lockout while cracking your password.

If you must use VNC over the Internet, run it on a randomly chosen port number (not 5900) to avoid detection in port scans that cover only the common ports. Preferably, tunnel your VNC connection over SSH to protect yourself against eavesdropping and man-in-the-middle attacks. If you do this, you should set vncserver to not accept connections from the Internet, disable password-only authentication on the SSH service and use public-key authentication to protect against common brute-force password cracking attempts.

Restarting vncserver should reset the lockout. The manual page does not mention any way to disable the (already inadequate?) lockout entirely.

2016年11月1日 星期二

Install Python OpenCV through Conda

環境:
  1. Windows 10, 64-bits
  2. Anaconda2-4.2.0-Windows-x86_64'

執行以下命令,以安裝 OpenCV 2.x.x:
anaconda show menpo/opencv

執行以下命令,以安裝 OpenCV 3.x.x:
anaconda show menpo/opencv3

執行以上指令後,即能獲得不同 OpenCV 版本的安裝提示,如:
conda install --channel https://conda.anaconda.org/menpo opencv3

conda install -c menpo opencv3

測試是否安裝成功(在 Python 環境中下達以下指令會顯示所安裝的 OpenCV 版本):
>>> import cv2
>>> cv2.__version__

Modify _WIN32_IE definition in MinGW commctrl.h

這個問題是在使用 MinGW g++ 編譯 OpenCV Libraries 發現的問題,
編譯的過程產生的現象如下:
C:\opencv\sources\modules\highgui\src\window_w32.cpp:51:6: warning: "_WIN32_IE" is not defined [-Wundef]
#if (_WIN32_IE < 0x0500)
...

起因是 _WIN32_IE 的定義在 MinGW 裏面未符合使用者的作業系統版本。

所以,只要把 MinGW 套件中的 commctrl.h 程式改變幾行就可以了, 如下:

原來的版本:
#ifndef _WIN32_IE
/* define _WIN32_IE if you really want it */
#if 0
#define _WIN32_IE 0x0300
#endif
#endif

改成:
#ifndef _WIN32_IE
/* define _WIN32_IE if you really want it */
#if 1
#define _WIN32_IE 0x0601
#endif
#endif
即可。(0x0601 代表作業系統是 Windows 7)