Installing Python Imaging Library ( PIL )

Django Image Field Requires PIL support.

If you find this error ”
“image”: To use ImageFields, you need to install the Python Imaging Library. Get it at

Use the below fixes sequentially. Fixes are for Ubuntu/Unix Only.

sudo apt-get install python-imaging

sudo apt-get install python-dev
pip install PIL

** Don’t Use sudo if you are in a virtual environment.
** If PIL is already installed then upgrade it using

pip install -U PIL

How to use your web server as a proxy

If you have a unix web server ( ex. Ubuntu ), you can use it as a proxy for surfing internet.

Here is the process ,

Ubuntu/Mac :

  • Open Terminal and type
    ssh -4 -D 3128
  • Web server shell will popup. If it says “unable to bind spcified port, change the port number( i.e 3128 ) to something else.
  • After that in your firefox/internet explorer  proxy settings, use

    SOCKS5 Proxy : with
    Port :  3128 ( or your specified one, while connection )


  • For windows, you need to download ssh client software “putty” or Install any bash/shell for using ssh command to connect to the server
  • After Connecting with server using putty/bash follow the same process above mentioned for ubuntu/mac os


Software Links :

Make all hidden files unhidden from command line [ Windows ]

[ Windows Only ]

Sometimes .exe viruses makes folders as folder-name.exe and hides the original folder as “Hidden” folder.

There the command to fix it from command prompt .

attrib /D /S -r -h -s

Here /D /S for all directory and files.

– for unset attribute
+ for set attribute

r for unset readonly attribute
h for unset hidden attribute
s for unset system attribute

PHP Unicode Conversion Problems

Unicode conversion in PHP

“For URL Links ” with [ dr-th%c3%a9r%c3%a8se-coffey ]

html_entity_decode ( dr-th%c3%a9r%c3%a8se-coffey" , ENT_QUOTES );

“For Unicode ” with [ érèse ]

utf8_encode ( html_entity_decode ( "érèse"   , ENT_QUOTES ) )

“For Unicode Json ” with [ érèse ]

utf8_encode ( html_entity_decode ( "érèse"   , ENT_QUOTES ) )


Wrong permissions on configuration file, should not be world writable!” error on phpMyAdmin


phpMyAdmin want to be not world writable, it’s sound simple, but not if you run phpMyAdmin from an NTFS filesystem (in my case, linux server who mount a Windows folder) it’s not that simple. There are two way to solve this problem :

Simple way, Linux Server, Linux Filesystem

Just chmod 0755 the file

chmod 0755


Linux or Windows Server, NTFS Filesystem

If like me you run a Linux Virtual Machine who mount a Windows folder where phpMyAdmin sources are located, edit and add this line :

$cfg['CheckConfigurationPermissions'] = false;

This will tell phpMyAdmin to stop checking for fileperm because they can’t be properly detected.

Hope this help

How to Fix Slow/Erratic Wi-Fi Problem in Ubuntu 12.04 LTS?

How to Fix Slow/Erratic Wi-Fi Problem in Ubuntu 12.04 LTS?
  • First, you need to install Wicd from Ubuntu Software Center.
  • Search for Wicd network manager in Ubuntu Software Center.
  • After Wicd installation is complete, search for ‘network-manager’ in Ubuntu Software Center and remove it before going any further.
  • Now, open Wicd from Unity Dash (see screenshot above). Wicd will automatically detect the available networks around. Simply enter the credentials and CONNECT.
wicd network manager
  • And when you tick “Automatically connect to this network” option, Wicd will be added to your Startup Applications list. And you’re good to go.
  • OR if you prefer command line, all you need to do is the following:
sudo apt-get install wicd
sudo apt-get purge network-manager

How to change wordpress theme without wordpress admin panel ?


There are situations you can’t login into wordpress admin panel to change the wordpress theme.

You can do the following procedure to change it without login into wordpress admin.

1. Login using FTP and change the rename the theme name to temporary. Next time wordpress will revert back to default theme.

2. Change it directly from databse. To do that Enter into PhpMyAdmin or MySQL Console and execute below query,

UPDATE wp_options SET option_value = 'default' WHERE option_name = 'template';
UPDATE wp_options SET option_value = 'default' WHERE option_name = 'stylesheet';
UPDATE wp_options SET option_value = 'default' WHERE option_name = 'current_theme';

To Check the current active theme name you can also execute this before updating it to default theme ,

FROM wp_options
WHERE option_name = 'template'
OR option_name = 'stylesheet'
OR option_name = 'current_theme';


( Be sure that theme folder contains the default wordpress themes comes with the installations ( TweentyEleven & TwentyTen until Version 3.0 ).