Send Emails from PHP on Ubuntu localhost LAMP setup

In this article, I will walk you through the process of configuring your local, Ubuntu based development machine to send emails from within PHP and also from the command line terminal. In a nutshell, you need to install and configure a mail server on your local computer. The mail server that we are going to use is Postfix. So without any further delay, lets get started.

Open up the terminal and, first of all, enter the following command:

It will make available the “mail” command on your terminal and also will install all the programs that it depends on. Our desired mail server Postfix is one of them. During installation, accept the defaults as configuration options of Postfix when asked.

Once the installation is complete, type following command:

Continue reading Send Emails from PHP on Ubuntu localhost LAMP setup

Ubuntu 13.10: Touchpad Stops Working After Suspend – Solution

I am running Ubuntu 13.10 64bit on my Lenovo G500 laptop. I was facing a strange problem. Whenever my laptop went to the suspended state and I resumed it afterwards, its touchpad was not working. A little bit of Googling returned a simple solution that worked like a charm. I am summarizing that solution here in this post for future reference of me and anyone else facing a similar problem.

Open up the terminal and type following command:

It will create a new file named “0000trackpad” in the /etc/pm/sleep.d/ directory and subsequently open it for editing in gedit. Paste following code snippet in this window, save the file and close it.

Back to the terminal, type following command to make the newly created file executable:

And … that’s it. Above steps solved the problem for me and hopefully will do the same for you too. Suspend/Resume your laptop a few times to make sure that your touchpad no longer gets disabled automatically.


Semantic Versioning – A recommendation for numbering releases of a software

Semantic Versioning is a recommendation for numbering different releases of a software package. It is widely being used by the open source software projects. From the day one about 4 years ago when I first started getting interest in the open source software development and communities surrounding such projects till today, I was developing an intuition about how these projects number their different versions. But I never searched for it seriously, thinking that I am far away from a stage where I will have to apply this scheme to one of my own projects because I am still a noob 🙂

But, a few days ago, I started working on a plugin for the MyBB forum creation software and hosted its source code on GitHub. Today, I was reading GitHub’s help page about releases. It linked to this official spec of Semantic Versioning. I read it and was amazed by the clarity with which it was written and explained. Plus, I was happy to find that much of the intuition that I developed during this time about the versioning scheme of most open source software projects was indeed correct 🙂

I highly recommend that you also go through this short specification before releasing any of your own piece of software, how little it may be, to the public. The rationale that it provides to back its recommendations really makes sense.

mongo shell – JavaScript execution failed: Error: couldn’t connect to server – Quick Fix

I have just installed MongoDB v2.4.5 on my Ubuntu 13.04 64 bit system and when I tried to connect to the server from command line using the mongo shell provided with the installed mongodb-10gen package, I got the following error:

I tried to start, stop and restart the mongodb service using these commands but the error remained there:

Finally, I looked at the log file ( /var/log/mongodb ) and found the following error message listed there: Continue reading mongo shell – JavaScript execution failed: Error: couldn’t connect to server – Quick Fix

How to Manually Update Avira Free Antivirus

If you are not able to automatically update your installation of Avira Free Antivirus to the latest virus definitions for any reason, then don’t worry. It is still very easy to update it manually. Using this method, you can also update Avira Antivirus on such a computer which is not directly connected to the internet. To update, just follow the simple steps given below:

  1. Go to Avira’s official website and there click on the “More about VDF” link in the “Latest VDF Status” block present in almost center of the page as shown in the following screen shot. Manually Update Avira Free AntiVirus Continue reading How to Manually Update Avira Free Antivirus