Stop Facebook face recognition feature in photo tags

Photo uploading and sharing is a big part of the social experience on Facebook. The number of photos uploaded on Facebook every year is in the billions, beating out even dedicated photo sharing sites like Flickr. In fact, Facebook’s photo upload feature is one of the reasons for Flickr’s gradual decline.

Facebook has a tagging feature for photos, where your friends can be ‘tag’ged on photos, and it gets posted to their Facebook pages too. Last year, Facebook introduced an intelligent face detection feature when tagging photos, that learns your friend’s faces from previously tagged photos, and suggests names in photos you upload afresh.

This can be a boon for those who upload large number of photos to Facebook, all with their friends in it. Manually tagging each photo can be a real chore, and the auto tagging feature greatly speeds up the tagging feature.

However, as with many other things on Facebook, this feature has serious privacy implications too. There may be cases where you do not want your name to be associated with particular photos, for example if you are in embarrassing situations that may trouble you in future (cases like photos on social networks costing people their jobs are not uncommon now).

Face tagging feature is on by default. But Facebook provides an option to turn it off in the privacy settings page. To do so, follow the steps below:

Click the arrow next to Home link on the top right of the screen. Click Privacy Settings.

Scroll down to “How Tags Work” and hit the “Edit Settings” link next to it.

In the popup that comes up, click the line that says “Tag Suggestions when friends upload photos that look like you”.

Click on the drop down, select “No one” and hit okay.

Fix Windows XP laptop unable to connect to WPA, WPA2 encrypted wireless networks

When a relative came for a brief stay in my house recently, he tried connecting his Windows XP laptop to my wifi router which is secured with WPA2 encryption. He got the following error:

Windows is unable to connect to the selected network. The network may no longer be in range. Please refresh the list of available networks, and try to connect again.

The network was visible to the laptop, but on trying to connect, the above error would come up. The error message is not very helpful, as the network was obviously in range and my laptop and smartphone both showed full signal strength.

Amazingly, even a service tech could not fix the issue. After much troubleshooting and trial-and-error, I found that the issue is caused by Windows XP itself. Windows XP, with Service Pack 2 and below, does not support connections to a WPA encrypted wireless access point natively. SP2 supports WPA2 after installing the necessary software.

In pre-SP2 machines, there will not be an option for WPA encryption method when you try to add a network manually (only WEP will be available).

There are three possible solutions to this:

  • Change your router settings and configure it with WEP encrytpion.
  • Install the required update on SP2.
  • Update your laptop to SP3

Update to Windows XP Service Pack 3

The easiest method is to update to SP3, as this provides WPA network access natively, with zero configuration and no additional software installation required.

Use WEP encryption on your wifi router

Changing to WEP is not recommended, as it is easily hackable. There are tons of tutorials online anyone can follow and crack your password and use your internet connection for free. However, in cases where updating your laptop to SP3 is not possible, or this can be used.

Install KB917021 update (only on XP SP2)

On systems running XP with Service Pack 2, you can install the KB917021 update (direct download, no genuine Windows validation required) to make your computer connect to WPA networks.

Another probable cause for this error message and being unable to connect to WPA secured wireless access points is lack of support for these encryption protocols, by the hardware (network chipset). Older chipsets may not support WPA and WPA 2, search online for your network chipset technical specs to know if this is the case.

In this case, the only solution for you is to upgrade the WLAN chipset (possible on desktop PCs fitted with Wifi cards, not very viable on a laptop) or change your encryption method to WEP.

In some cases, the wireless LAN chipset manufacturer might have released newer drivers that add support for these newer security protocols. To see if that is the case, visit the drivers or downloads section of your chipset manufacturer’s website.

“Insert SIM” error in Nokia N95 even when SIM is inserted

My trusty and much-abused Nokia N95 has been giving an “Insert SIM” error when switching on, even when it has a SIM inside.

Here are a few things I tried, and what worked for me. Be sure to try each of these, because what worked for me may not necessarily work for you.

  1. Try changing the SIM card to see if it fixed the error (it did not, for me).
  2. If changing SIM does not work, try cleaning the SIM card to see if its gold contact contains dirt and is causing problems.
  3. The SIM holding apparatus might be damaged due to repeated falls or usage. Try cutting a piece of paper in the shape of the SIM card, and keep it on top of the SIM (and then close the steel holder). This trick worked for me.
  4. If the Insert SIM error does not occur with a new SIM, the problem could be caused by your SIM. Try cleaning the SIM, and if still not fixed, contact your network operator for a duplicate SIM card. Most operators provide duplicate SIMs for a minor cost.

If you had this Insert SIM card issue on your phone, and fixed it with some other trick, leave a comment to let others know. I will also update this article if there are more suggestions.

Causes and fixes for “Parse error: syntax error, unexpected $end” PHP error

After writing some PHP code, I encountered this weird error that displayed this message: “Parse error: syntax error, unexpected $end” on the page and did not execute any other code.

It appears that there are multiple causes for this error, and is a syntax error – that is, missing some code or writing the code differently from how the compiler expects it to be.

Below are the common causes (the problem I had is listed first) and how to fix them:

Missing or unmatched parantheses

If you have not learnt a C-style language before, PHP is rather confusing with all its braces {} and parantheses (), which are often used to nest code, seperate code and for various iteration elements etc.

In my case, the error was caused by a space between if and parenthesis when I wrote a PHP function definition. The code was something like below:

<?php if (get_theme_mod('footerwidget') == 'Yes' { ?>

As you can see, I have two opening parentheses ‘(‘ but only one closing parenthesis ‘)’, leaving the code incomplete and causing the error. Fixing the error can be done by ensuring that all the open parantheses are matched by closing ones.

Missing or unmatched braces

Similar to the above case, missing braces {} can cause the error. Braces find use in PHP very often, and it is not unusual to write code nested several layers deep, each marked by braces. It can get confusing in such cases.

A handy tip for both missing braces and parentheses would be to write the opening and closing braces or parantheses first, like {}, and then go back between the braces and start writing your code. That way, you would not forget to close the brace.

Short hand PHP tags on unsupported systems

A variation of this error is “Parse error: syntax error, unexpected $end in X on line Y”.

This is usually encountered if you use the PHP quick tags (<? ?>) in code, but the server does not support them (disabled in PHP.ini file). To fix this, you can either change all quick tags to regular tags <?php ?> (recommended), or enable the short hand in php.ini file (which is not recommended for security reasons, and also depreciated). force close / crash

After buying an Android phone, I started getting the error “The process has stopped unexpectedly. Please try again” every few seconds. This seemed to happen when moving between different custom ROMs like Cyanogenmod and MIUI, perhaps because I restored the wrong Titanium backup files mistakenly, included system settings in the batch restore or something similar.

Getting a force close message like this can be irritating, especially when it comes up repeatedly, every few seconds. I tried the usual route of formatting the phone and reinstalling the ROM, then restoring all my apps with Titanium Backup. With the new ROM in place, there was no error flashing, but when I restored apps, the error started appearing again, that was how I came to the assumption that something I do after reinstalling the ROM is causing the error message.

Below are some possible fixes (first one worked for me), but different fixes may work for different cases. Doing factory reset is the absolute last resort, as you will lose your apps, data and settings, but you can try these other solutions. One of them worked for me, but this issue seems to not be fixed by any one fix for all people.

Note that many of these involve clearing data, which resets the app or Android components that handles specific tasks. You might have to sign in to some services (like Play Store), or might lose the cached data for that app. This is unavoidable, as the errors seem to have stopped after doing so, from experience. If I find ways to fix the error and force closing without clearing data, I will update this page.

Fixes for FC and crash

Go to your app settings page (Settings > Applications > Manage Applications) and open Media Storage. Hit clear data.

If you have a custom recovery installed (most custom ROMs and kernels do have it), boot into it and fix permissions. In Clockworkmod Recovery, you can find it under “Advanced”. TWRP recover also has a similar option. Being a Linux-based OS, permissions are of paramount importance to smooth functioning of Android components.

In Manage Applications, open Google Services Framework. Clear data.

Open Google Play Store. Hit clear data. Note that this will clear all play store data, including your Google sign in. You will have to login with your Google / GMail account again the next time you open Play Store.

Open Download Manager, and clear its data too.

Backup your data and format SD card. Make sure to backup all data on your SD card, including media, apps and other files, before formatting it. Use FAT32 formatting, which is preferred for Android. This is because is related to camera, gallery and other multimedia components, and SD card errors may cause this force close error.

Try a different SD card. Many SD cards, particularly those of class 6, 8 and 10, have been reported to not work reliably with Android devices. Class 4 seems to be the safest option (I use a San Disk Class 4, and it has been flawless).

Hopefully, these should fix the error. Let me know in comments if it does not, or you have a different solution to the force close error.

Virus that infects thumb drives and renames folders with .exe extension

USB flash drives are a common way of spreading malware among computers. Users typically plug in USB drives into public computers and 3rd party workstations at office, college, libraries or labs without being careful about what they might expose their data to, or the kind of malware (virus, worms, trojans etc.) that get into their pen drives.

Recently, my favorite 16GB San Disk Cruzer drive got infected by a virus. All folders apparently got a .exe joined at the end, ie. Pictures folder became “Pictures.exe”. Clicking the folders opened a command prompt that flashed for a second. No folder could be opened. It seemed as if I lost all the data inside folders.

The virus seems to affect only portable drives, and left my permanent hard drives untouched.

Identifying the USB virus

Seeing the .exe extension, I became suspicious, and ran an antivirus program, Avast, that was on the system. It failed to detect any malware in the flash drive. As a last resort, I tried enabling “Show hidden files, folders and drives” and “Hide protected operating system files” (in Tools > Folder Options > View tab). This revealed all the actual folders that contain data.

So, it was identified that the virus creates duplicates of the folders and fools the user into thinking that all the files and folders have disappeared, whereas, in reality, they have been merely hidden.

Removing the virus, restoring folders and files

The virus has been in existence for several years (according to some research paper, I forgot where I found it), but unfortunately, Avast and AVG, the two antivirus software I tried to use initially, failed.

Malwarebytes Antimalware detected and removed the virus, so I recommend giving that a try. In its free version, you can only scan (and not use it as realtime protection), which is plenty good enough for most users.

Though the virus would be gone after you followed the above step, your folders will still retain their hidden and protected attributes.

To change that, download and use Attribute Changer, a handy free utility to change the hidden / system / protected attributes of files and folders.

Android 4 Ice Cream Sandwich-compatible full Swype.apk (offline) installer

Swype is an innovative keyboard for Android phones. It works by tracing the letters of each word in a continuous path, rather than hitting each key separately. This is particularly useful for those with fat fingers, or small screens.

More and more Android OEMs are integrating Skype in their custom Android skins, like Samsung with their TouchWiz and Motorola with their Motoblur UI. For everyone else, Swype is available for free download. Swype has been in beta testing for some time now, and earlier, they had a limited beta program where only a select few with invites would get to test Swype software. That has changed now, and anyone can download their appropriate resolution-dependent version of Swype from their website.

However, one sore thumb about Swype is that they do not provide full installer files (Swype .apk files) through their official website. What they have for download, instead, is a “Swype Installer” that downloads the actual Swype files through a data connection. This requires a fast and reliable 3G or Wifi connection, which some of us are not blessed to have (especially the ‘reliable’ bit!).

Here, we have a Swype installer – downloadable full .apk file. Hit the link below to get the file, and install it using any file manager (you have to ensure that “Unknown sources” under Settings -> Applications is enabled first).

This Swype version works on Android 2.3 Gingerbread, and also Android 4 Ice Cream Sandwich. Its dark looks are perfectly suited to ICS, which should serve you well if you are one of the lucky few who already run ICS on your phone.

Download Swype v5.apk (size: 23.23 MB)

Root and flash custom ROMs on Galaxy S2 without incrementing flash counter

Samsung is known to be rather friendly to the hacking and modding community around Android. They have unlocked boot loaders in their phones, making it easy to flash custom kernels and ROMs, and they even sent a bunch of Galaxy S2s to the Cyanogenmod team with the request that they make the Cyanogenmod ROM compatible with Galaxy S2.

However, being a business, Samsung has to protect its profits, and this includes detecting modification to software and denying warranty to such devices. Samsung Galaxy S2, successor to the Galaxy S and one of the most popular Android smartphones around, is known to have a flash counter in its boot loader.

Simply put, this flash counter counts the number of times that you flash a non-stock kernel (ie. something other than Samsung-provided kernel). This is an easy way to detect whether your phone’s software has been modified by you.

A common method of rooting a phone is to flash a custom kernel (via Odin or Heimdall) that has Superuser.apk and su binary in it, or has some vulnerabilities that can then be exploited by a desktop app like Super One Click Root to root the phone. Unfortunately, these methods would trigger the flash counter, and you might loose your warranty claims.

If you flash a custom kernel (non-Samsung or Touchwiz or stock kernel) directly with fastboot or Odin or Hemdall,, then the phone detects it and shows a yellow triangle at boot time. Once you trigger this flashing triangle, it is not trivial to reset it. Previous versions of bootloaders had vulnerabilies that were exploited by a tiny USB chip to reset the triangle. These USB keys were available for cheap on eBay. Unfortunately, newer bootloaders (especially those with Android 4 ICS and newer) can no longer be reset by this USB dongle.

So, the best way to avoid this mess is really not trigger the triangle / flashcounter in the first place. Below is a workaround to the flash counter, that helps you root and flash all you want, without ever incrementing the flash counter. I have used this method for several months now without any issues.

Note: All instructions below are for the international version of Galaxy S2 called i9100. Instructions are similar for other carrier specific variants like AT&T’s Skyrocket i777 or SGS2 i9100G, but you just have to pick the specific kernel and ROMs for your device (and not those meant for i9100).

Rooting and flashing without incrementing flash counter

  1. Use Superoneclick or DoomLoRD’s Easy Rooting toolkit to root your phone without flashing any custom kernel, so it won’t increment. Downloads and rooting instructions are given on the respective links. Ask here in comments if you have any issues.
  2. Install Mobile Odin.
  3. From Mobile Odin, flash a CF Root kernel that contains Clockworkmod Recovery.

Once you have Clockwork Mod Recovery, you can flash any ROM, kernel or modem files by downloading CWM-flashable zip files (which are provided by most ROM and kernel makers), putting it on your SD card and entering CWM during device startup, to flash it. Make sure to not flash anything via Odin or Heimdall on your desktop.

You can use Mobile Odin, or ADB from your computer(if you have ADB and all required drivers) also. However, I didn’t include those steps as only a minority of Anrdoid users would have it all set up.

How to get a zip of only changed files between two WordPress versions

WordPress, the popular blogging software, often has a minor update out a few days after a major release, to fix security bugs and clean up code – like 3.2.1 coming after 3.2.

If WordPress auto update works for you, then upgrading your blog is a 10 second job. If not, manually uploading files and upgrading the software can be a bit painful task.

More so when you realize that the number of files that have been changed, from a major release like WP 3.2 to 3.2.1 is only a handful of files, usually under 20. An easier way to upgrade would be to overwrite only those changed files, thereby making the upgrade fast and painless even over FTP, on a dialup connection (which is my setup sometimes!).

Follow the steps below to get a zip file containing only the changed files from any other version of WordPress. Note that this does not have to be the just-preceeding release of WP – you can select the two version numbers.

Visit the WordPress Trac and note the revision numbers (listed under Rev column) of the two WordPress versions. Then, enter that into the URL listed below, filling in OLDVERSION and NEWVERSION, and OLDREV (revision no. of older WP version), NEWREV (revision no. of newer WP version).

For example, to get the files that changed from version 3.2 to 3.2.1, you would use the URL:

The above is a working URL – click it and you can download a zip archive of files changed between WordPress 3.2 and 3.2.1.

Fix computer not connecting to any internet connection

For the last few weeks, I noticed that only my laptop does not connect to any internet connection – home Wifi router, ADSL modem via ethernet cable, USB data card and mobile 3G internet. The laptop would get connected with the USB data card and mobile phone, but not load any data. The same devices / methods work for other devices like my mobile phone and desktop PC. Clearly, this was an issue with the laptop alone.

The laptop would give a “This webpage is not available because DNS lookup failed……” error in Chrome. Firefox also displayed an error message, though not with as many details.

As anyone in my situation would do, I tried searching around on Google for solutions. Most solutions were aimed at fixing DNS errors.

Pinging websites on the command line failed, as did IP addresses – thereby ruling out DNS issues. A ping to worked, thereby ruling out a damaged NIC (networking hardware).

I started going backwards to see what action specifically caused the internet blackout. I narrowed it down to a CCleaner cleaning action. Searching online revealed that I was not the only person who encountered problems with connectivity after running a registry scan and fix with CCleaner. System restore was one obvious solution, but unfortunately I did not have a restore point that was old enough. Many forum users had even gone so far as to reinstall Windows just to get rid of the net issue.

I thought of using registry fixing software available online, but not before trying CCleaner itself one last time. Running the registry “scan and fix errors”, then rebooting the system worked.

Perhaps, my analysis that CCleaner caused the registry corruption leading to connectivity issues is wrong. CCleaner lives to tell the tale on my system….