Kill Task on Specific Port Windows Command Line

Leave a Comment
Some times we want to kill task on specific port in order to start the task we want to run. Many times if this is happens what we do is , normally we do restart. Here is simple technique to kill specific task that runs on specific port without restarting the our system.

1. First we need find out task ID which runs on the specific port using following command.

C:\Users\username>netstat -o -n -a | findstr 0.0:80

suppose I want to kill the task that runs on the port 80, then I will run the following command to get task ID that runs on port 80. It will gives result like this.

TCP    0.0.0.0:80      0.0.0.0:0              LISTENING       1344


2. Next we need to kill the task using task ID we got from previous command.

Now run the following command to kill the task.

taskkill /F /PID 1344

keytool error java.io.filenotfoundexception

Leave a Comment
This could happen if you are not running the command prompt in administrator mode.

I had the same problem under Windows and could solve it by running cmd.exe as administrator (right-click in start menu, then "Run as administrator).​

keytool error java.io.filenotfoundexception

'keytool' is not recognized as an internal or external command

Leave a Comment
When you run  "keytool" command from windows command line tool from other java bin directory it throws following error.

'keytool' is not recognized as an internal or external command
'keytool' is not recognized as an internal or external command

In order to successfully run the "keytool" command, you must change your working directory to java bin folder. Use following command to change working directory..

Note : Please find your Java bin folder under program files/Java folder..

Mine in the following directory

cd C:\Program Files\Java\jdk1.8.0_65\bin

or

cd C:\Program Files\Java\jre1.8.0_65\bin

In most cases you are behind a proxy or have bad network settings - NodeJS & NPM

Leave a Comment
Npm install will not work, if you are behind the proxy server. If you try to use any npm install command then you will get the following errors.

  • You are behind a proxy or have bad network settings
  • Tunneling socket could not be established cause=getaddrinfo ENOTFOUND

So you need set the http-proxy & https-proxy in nodejs configuration file using following commands.

​npm config set proxy http://ex-proxy.com:8080
npm config set http-proxy http://ex-proxy.com:8080
npm config set https-proxy https://ex-proxy.com:8080

If still have same issues then close your command line window, and open it. Then try with npm install command

SQL Query To Insert Tamilnadu Distrcits

Leave a Comment
Here is the insert SQL query to insert list of Tamilnadu districts.
INSERT INTO `districts` (`id`, `district_name`, `state_id`) VALUES
(1, 'Ariyalur',31),
(2, 'Chennai',31),
(3, 'Coimbatore',31),
(4, 'Cuddalore',31),
(5, 'Dharmapuri',31),
(6, 'Dindigul',31),
(7, 'Erode',31),
(8, 'Kanchipuram',31),
(9, 'Kanyakumari',31),
(10, 'Karur',31),
(11, 'Krishnagiri',31),
(12, 'Madurai',31),
(13, 'Nagapattinam',31),
(14, 'Namakkal',31),
(15, 'Nilgiris',31),
(16, 'Perambalur',31),
(17, 'Pudukkottai',31),
(18, 'Ramanathapuram',31),
(19, 'Salem',31),
(20, 'Sivaganga',31),
(21, 'Thanjavur',31),
(22, 'Theni',31),
(23, 'Thoothukudi (Tuticorin)',31),
(24, 'Tiruchirappalli',31),
(25, 'Tirunelveli',31),
(26, 'Tiruppur',31),
(27, 'Tiruvallur',31),
(28, 'Tiruvannamalai',31),
(29, 'Tiruvarur',31),
(30, 'Vellore',31),
(31, 'Viluppuram',31),
(32, 'Virudhunagar',31);

Here is Tamilnadu districts SQL insert query without state id .
INSERT INTO `districts` (`id`, `district_name`) VALUES
(1, 'Ariyalur'),
(2, 'Chennai'),
(3, 'Coimbatore'),
(4, 'Cuddalore'),
(5, 'Dharmapuri'),
(6, 'Dindigul'),
(7, 'Erode'),
(8, 'Kanchipuram'),
(9, 'Kanyakumari'),
(10, 'Karur'),
(11, 'Krishnagiri'),
(12, 'Madurai'),
(13, 'Nagapattinam'),
(14, 'Namakkal'),
(15, 'Nilgiris'),
(16, 'Perambalur'),
(17, 'Pudukkottai'),
(18, 'Ramanathapuram'),
(19, 'Salem'),
(20, 'Sivaganga'),
(21, 'Thanjavur'),
(22, 'Theni'),
(23, 'Thoothukudi (Tuticorin)'),
(24, 'Tiruchirappalli'),
(25, 'Tirunelveli'),
(26, 'Tiruppur'),
(27, 'Tiruvallur'),
(28, 'Tiruvannamalai'),
(29, 'Tiruvarur'),
(30, 'Vellore'),
(31, 'Viluppuram'),
(32, 'Virudhunagar');


The requested PHP extension ext-intl * is missing from your system CakePHP 3

Leave a Comment
The requested PHP extension ext-intl * is missing from your system is shown because ext-intl is not enabled in your php.ini file.



To enable intl extension follow the instructions below.

You need enable extension by uncommenting the following line extension=php_intl.dll in the php.ini file. Once you uncomment the extension=php_intl.dll, then you must restart apache server using XAMPP control panel.
(Note: php.ini file mostly in the following directory C:\xampp\php)

 Next follow this tutorial to install CakePHP 3 

Install CakePHP 3 using Composer

Fatal error: require(): Failed opening required autoload.php CakePHP 3

Leave a Comment
This error is shown because CakePHP 3 dependency files are not installed, while installing CakePHP 3.

To install CakePHP 3 successfully you need to enable following intl extension in your php.ini file.

You need enable extension by uncommenting the following line extension=php_intl.dll in the php.ini file. Once you uncomment the extension=php_intl.dll, then you must restart apache server using XAMPP control panel.
(Note: php.ini file mostly in the following directory C:\xampp\php)


Now follow the following tutorial to install CakePHP 3.

Install CakePHP 3 using Composer
It may also through following errors.

Warning: require(C:\xampp\htdocs\cquiz\vendor\autoload.php): Cakephp