// archives

Tips N Tricks

This category contains 19 posts

Solved: pfSense is not letting Tata Photon to talk to Tata Indicom Broadband

Recently I faced this strange issue at a client’s place. Users using Tata Photon USB modem were not able to browse the website and other services, hosted on a server sitting at my client’s office. The client is using a Tata Indicom Broadband connection at the office. The server is sitting behind a pfSense firewall.

To add to the confusion, users using Airtel broadband and Reliance USB modem were able to browse the website. It was easy to blame Tata for this but the culprit (well, more or less) was the pfSense firewall. Read the rest of this entry »

GD Star Rating
loading...
GD Star Rating
loading...

Solved: Extension filename.php not present

The day was pleasant till I got an E-mail from a client with a PHP script file attached to it. I had to schedule the PHP script via Cron on a Linux server. For PHP scripts in Cron, I do not prefer writing the Cron job as:

1  30  *  *  *  /usr/bin/php -q /opt/script.php

Instead, I prefer a crisper line as:

1  30  *  *  *  /opt/script.php

The latter is obviously neater and readable. To prepare a PHP script to execute just by the filename, you need to do two things:

  1. Add a line to the path to the PHP interpreter at the top of the script. For example:
    #!/usr/bin/php -q
    <?php
    // PHP code
    ?>
  2. Make the script executable as:
    chmod + script.php

Before inserting it in Cron it is always a good idea to test the script by executing it manually as:

/opt/script.php

What always worked for me, failed on me this time with an error saying: Extension /opt/script.php not present. What will you do when you get an informative error (being sarcastic) like this? I too had no clue. Read the rest of this entry »

GD Star Rating
loading...
GD Star Rating
loading...

Solved: Unable to call toll free numbers in India using Windows Phone 7

I recently purchased a Dell Venue Pro powered by Windows Phone 7. It has been about 10 days that I’m living with lack of apps, tethering, E-mail client with conversation view and a feature rich Twitter client. I’m hoping that most of these will be solved by future updates and upcoming apps.

On the other hand, I’m at war with issues on the phone due to lack of my familiarity with a Windows Phone. After all, I had been using Android for almost two years. One issue that bothered me the most was, I could not dial toll free numbers in India using my Dell Venue Pro. Read the rest of this entry »

GD Star Rating
loading...
GD Star Rating
loading...

Solved: Setting up D-LINK DWA-525 (RaLink Device 3060) Wireless Desktop PCI Adapter on Fedora 14 Linux

D-Link DWA-525 Wireless N 150 Desktop Adapter

D-Link DWA-525 Wireless N 150 Desktop Adapter

My new “desktop grade server machine” at home has a 802.11n wireless PCI adapter namely D-LINK DWA-525 Wireless N 150 Desktop Adapter.  An adapter like this plugs into one of the PCI slots and connects to a wireless or Wi-Fi network. This helps to keep the machine anywhere in the house and not necessarily near a router or Ethernet port.

On my desktop, I did a minimal or base installation of Fedora 14 Linux. Fedora was not able to recognize the wireless adapter and hence could not connect to the Wi-Fi router at my home. But with some efforts, I was able to make the adapter work on Fedora 14. Additionally, I was also able to configure the wireless adapter from the command line. What follows is a crisp tutorial with the required steps to setup DIR-615 PCI adapter on Linux.

Read the rest of this entry »

GD Star Rating
loading...
GD Star Rating
loading...

Install Fedora 14 Linux without a monitor (headless), keyboard and CD/DVD

As I tweeted http://twitter.com/#!/shekharg/status/30986928094453760 sometime back, I bought a new desktop for my home. This desktop (my home server) is with 16GB of RAM and with no monitor. For the monitor, I thought of hooking it up to my TV via a VGA port (a.k.a. RGB port). The machine has a DVD writer and I also bought a keyboard for Rs. 160.

I required the TV, keyboard and DVD drive only for the one time installation of the operating system. Post the installation, I access the machine only across the network – via SSH (Secure SHell) or a web browser.

But I decided against the easy way of installation using my TV and keyboard. Instead, I challenged myself to install Fedora 14 without using a monitor, keyboard/mouse and DVD drive on the server. Read the rest of this entry »

GD Star Rating
loading...
GD Star Rating
loading...

Solved: Images load up partially when served by Apache Web Server

This was a very strange issue which showed up at one of my client’s Web application. The application is hosted on a Apache Web server and serves JPEG images. These JPEG files reside on a different server and mounted via CIFS (loosely called Samba mount) on the Linux machine running the Web server.

Now the issue was, many JPEG images, especially the larger ones, loaded up only partially in a Web browser (both Internet Explorer and Firefox). What made them load fully was pressing CTRL+R or clicking on Refresh/Reload several times. Bandwidth wasn’t an issue here, since this problem occurred even when browsing the JPEGs from the local network. Read the rest of this entry »

GD Star Rating
loading...
GD Star Rating
loading...

Replacement battery for Android Dev Phone 1

This is a long pending post that I wanted to write. In April, after about a year of purchase of my Android Dev Phone 1 (a.k.a. ADP1), its battery started draining out. It became so bad that that I had to keep the phone always on charging. While at home/office, I used to charge it using USB/AC power. While driving, I kept it charging using a nifty car adapter.

After about a week of frustration and laziness (to search for a fix), I decided to buy a replacement battery. But the question was, whom do I contact for the replacement battery? HTC? Google? or Brightstar (the distributor) ? Phew…. Read the rest of this entry »

GD Star Rating
loading...
GD Star Rating
loading...

Solved: ‘requires bundle org.eclipse.wst.xml.core’ error, while installing Google Plugin in Fedora Eclipse

The simplest way to get started with developing for Google App Engine, Google Web Toolkit and Google Wave is to use the Google Plugin for the Eclipse IDE. This plugin installs the SDK as well. Eclipse’s built-in wizard to add new software (plugin) makes it very easy to install the Google plugin. This wizard can be supplied with a URL (http://dl.google.com/eclipse/plugin/3.5 in this case) to a download site. Henceforth, Eclipse takes care of downloading and installing the plugin, along with associated dependencies, bundle or required software.

However, for me, installing the Google Plugin didn’t go as smooth as expected. I have been using Fedora Linux on my laptop since the last 5+ years. Fedora ships with the Eclipse IDE. When I tried installing the Google Plugin in Fedora Eclipse, I faced the following error. Read the rest of this entry »

GD Star Rating
loading...
GD Star Rating
loading...

Solved: Garbled text in Putty

Putty is a popular and free Linux terminal/shell client for Windows. It allows one to connect to a Linux server using SSH (Secure Shell) or Telnet. I have been using it for as long as I can recall. But this issue of garbled text in Putty is what I have been ignoring, until yesterday.

Yesterday, I had setup Paradox database using DOSEMU on Linux, for a client. On Putty, the Paradox interface showed garbled making it unusable for the client. My instant suspect was DOSEMU. A quick check revealed that it’s happening with other apps too - those with a ncurses or text based user interface. Read the rest of this entry »

GD Star Rating
loading...
GD Star Rating
loading...

Drupal 6: Different Page Templates for different Content Types

Given the flexibility of Drupal, a different page template depending on the Content Type is not very demanding. The good news is, it is very much possible. The bad news is you may have to struggle like me to find the simplest, neatest and working method to achieve it.

Reading the documentation and Googling would result in many methods – some are confusing, some are not so neat and others apply to earlier versions of Drupal. Following is my favourite method to setup different page templates, depending on the Content Type, in Drupal 6. Read the rest of this entry »

GD Star Rating
loading...
GD Star Rating
loading...