Programming

PID 4 is using PORT 80 on Windows 7 !! Help

So i have been using apache to run a local server on my home computer (Well xampp exactly) , from the past few days i have been having trouble starting apache on port 80. I was wondering what could possibly be the reason for that , MySql was running fine on port 3306 but apache’s port 80 was being used by some process . So i did a netstat –ano command at the command prompt to see its output , and to my surprise PID 4 was using the port 80. To find out which Process has the ID 4 (Process ID 4) i launched the Task Manager (Ctrl + Shift + Esc) , went to Processes Tab and checked Show processes from all users

taskmanagerWell this is a screenshot after i got it working so you’ll see my httpd daemon is already running. I posted it just to make sure you guys are following me 

Now after some research i found some solutions , so i am going to list them all here. But none of them worked for me , (well they might for you)

Here is one solution from the site cameroncooke.com

1) Launch RegEdit:

2) Go to: HKEY_LOCAL_MACHINE\SYSTEM\CurrentControlSet\Services\HTTP

3) Add a new DWORD (32-bit) value

4) Name it ‘NoRun’ not including the quotes

5) Double click the new property

6) In the Value data field type ‘1? not including quotes and click OK

7) Re-boot your computer

Regedit

But obviously it didn’t work for me.

Second solution from the comments on the same post

Go to Services (search for “services” on windows start menu ) and then disable Windows Remote Management

Third solution that worked for me was to disable the Running IIS server on my computer. It is disabled by default and i have turned it on some days back for some reasons . Turning that off solved my problem. Go to Windows Start menu and search for “turn windows features on or off

Then start the program and uncheck the Internet Information Services

windows-features

Then just reboot your computer and try to start the apache (it will start ofcourse).

I hope it helps a few fellow web developers. if you are still facing trouble please ask in the comments section

 

Update : Sometimes SKYPE also occupies port 80. So make sure to run your apache server before you start skype

Web Developer Tips – How to disable spellcheck in firefox

Hello my fellow web developers and designers. Many times while creating a websites we are encountered with problem of not so good looking forms , and on top of that firefox’s built in spellcheck functionality adds to the disgrace by adding red dotted underline to misspelled words , or more appropriately words that are not in firefox’s dictionary. For eg. Have a look at the following “textarea” input field. It is a default textarea field with attributes rows="5” and cols=”40” set. i.e.

1
<textarea rows="5" cols="40"> </textarea>

 default textarea field with attributes rows="5” and cols=”40”

Do you see the red-dotted underline beneath “textarea” and “smartanuj” , they just are not good. Whatever firefox thinks to me both textarea and smartanuj are correct spellings. So how can i get rid of this problem.

Now here is a another subtle but significantly good looking textarea

Good Looking Textarea

You see how the textarea and smartanuj both are free of the red-dotted underlines. Lets see how you can accomplish the same.

To create the above textarea i used the following code.

1
2
<textarea spellcheck="false" rows="5" cols="40" style="border:1px solid #ccc;-moz-border-radius:4px;padding:5px;font-family:Verdana, Geneva, sans-serif;font-size:20px;color:#4B4949">
</textarea>

Lets break down the textarea bits by bits and understand whats going on there

spellcheck="false"

Disables the firefox spellcheck functionality on that textarea

 rows="5" cols="40"

Sets rows and columns of textarea or width and height of the textarea

 border:1px solid #ccc; 

Sets border around the textarea which is 1px in width , solid and has color code #ccc

 -moz-border-radius:4px 

Curves the border around the corners in an arc of radius 4 cms

 padding:5px 

Sets padding 5 pixels , so the characters are some pixels away from the borders

font-family:Verdana, Geneva, sans-serif;font-size:20px;color:#4B4949

Sets font-family to “Verdana , Geneva , Sans-serif ” , the size to 20px , and font-color to color code #4B4949

Isn’t it fairly simple. Important thing to remember , the make the styles inline to give the textarea proper formatting

If you have any questions please use the comments area below

Ubuntu 9.10 WUBI installation problem , GRUB screen after updating

Okay so I wanted to try Ubuntu 9.10 on my computer partially because it is so damn old to run windows 7 and partially because I wanted to give it a try. Only problem I didn’t have a Boot CD and my old computer won’t boot from a USB. So I tried WUBI and installed Ubuntu within windows. I was all set to try Ubuntu now. Ubuntu was running quite good , I had even shifted my development environment from Windows XP to Ubuntu 9.10. After running for a few days Ubuntu’s update manager notified me there are some updates, so i clicked Update and the update started. After the update it asked to Restart Computer and so i did.

After the restart when i tried to boot into Ubuntu , the GRUB screen came and i was like what do i do now ? I am a techie but i am not that into Linux so i was clueless there.

So i had to boot into Windows again , fire up Firefox and hunt the web for a solution as now i had everything in my Linux Environment.

Finally i found a solution  and compiled everything at one place.

Please follow the following steps if you too got stuck at the GRUB screen in a WUBI installation after doing a Linux Kernel Update / Update to Ubuntu

  1. sh:grub>set root=(loop0)
  2. sh:grub>linux /boot/vmlinuz-2.6.31-14-generic root=/dev/sda1 loop=/ubuntu/disks/root.disk ro
  3. sh:grub>initrd /boot/initrd.img-2.6.31-14-generic
  4. sh:grub>boot

please note /ubuntu/disks/root.disk is the location of your WUBI installation (default being C:\ubuntu)

this will enable you to boot into Ubuntu Back

After booting  into Ubuntu follow these steps to not to see that GRUB screen again during starting up.

  1. Open Terminal (Applications->Accessories->Terminal)
  2. Type sudo update-grub2 and click Enter, enter your administrator password and voila your GRUB list is made again. and you’ll not the GRUB screen again

I hope that helps. if you have any doubt please say in comments.

GO Programming Language by Google

Some folks at google plex decided its time to develop a new programming language which would be better than C and C++ . So they came out with

The Go Programming Language

a systems programming language expressive, concurrent, garbage-collected

a systems programming language expressive, concurrent, garbage-collected

Go was born out of frustration with existing languages and environments for systems programming. Programming had become too difficult and the choice of languages was partly to blame. One had to choose either efficient compilation, efficient execution, or ease of programming; all three were not available in the same mainstream language. Programmers who could were choosing ease over safety and efficiency by moving to dynamically typed languages such as Python and JavaScript rather than C++ or, to a lesser extent, Java.

Go is an attempt to combine the ease of programming of an interpreted, dynamically typed language with the efficiency and safety of a statically typed, compiled language. It also aims to be modern, with support for networked and multicore computing. Finally, it is intended to be fast: it should take at most a few seconds to build a large executable on a single computer. To meet these goals required addressing a number of linguistic issues: an expressive but lightweight type system; concurrency and garbage collection; rigid dependency specification; and so on. These cannot be addressed well by libraries or tools; a new language was called for. [Language design FAQ]

Okay according to people over at the golang.org here is a sample hello world application

How to say helloworld in Go language

How to say hello world in Go language

You can get all the details reagarding how to install and code in Go Language at their official website – golang.org

Here is a video about the same

Well how far this language will go is a something we’ll see in the coming years. Have your say in the comments !!