Upgrading to PHP 5.3 in Ubuntu

I’ve been using PHP 5.2 for a long time now. I’m not so apt towards change but PHP 5.3 has some cool features which I needed very much for my projects. So yesterday I decided to do that conversion. The process was not at all so simple and it took lots of googling and searching the forums, especially for removing the post-installation bugs. Finally, at Dec 27 12:45 AM I achieved 100% transformation to PHP 5.3. As my usual habit, I like documenting the stuff I do, so here it goes.

First thing before starting the process is to make sure that none of my existing projects would break. Because as the developers have said, PHP 5.3 is a major release with lots of changes. Many new features were added while many were removed or deprecated. And to avoid getting unnecessary warnings or notices, it was better to recheck my codes for compatibility with PHP 5.3. The PHP developers have written a good page in the PHP Manual which tells in detail about the things to take care of when migrating to 5.3 from 5.2. You can check it here : http://php.net/manual/en/migration53.php

So don’t forget to go through that page once, at the least the section which tells about the “removed and deprecated” features in PHP 5.3 and use the alternatives as suggested. Now you’re ready to upgrade. BUT, before that, you’ve to know that any software you use like phpMyAdmin or ldapPhpAdmin which uses PHP might broke. Well, you cannot do anything about it but you’ll have to reinstall them. Anyways, moving ahead, take a backup copy of your php.ini configuration file. You may need it for reconfiguring your PHP 5.3. If you’re using Apache 2, it can be found in /etc/php5/apache2/php.ini

Now, just run the following commands one by one,

Continue reading

Setting up Reliance/TataIndicom Wireless Internet in Ubuntu

It is very easy to setup a wireless internet connection using your Reliance or Tata Indicom DataCard on your Ubuntu running PC. I’ve myself faced a lot of problems and finally here I am with a well-researched solution. I’ll try to simplify it as much as I can but it is not an easy job. Its going to be a little scary, but don’t lose hope and try finishing steps 1 to 6. Now start following the steps :

Step 1 : (Optional) I’ll strongly recommend you to upgrade your Ubuntu to latest Ubuntu 9.10. If you have not done it yet, I assure you that this will make your life much easier.

Step 2: Download the package ‘wvdial’. If you have an internet connection (may be DSL on ubuntu),  execute the following command :

sudo apt-get install wvdial

However, if you can’t connect your Ubuntu PC to internet for some reason then you’d have to install wvdial manually. This may take some of your time, patience and skill. Refer this article.

After you’ve downloaded and installed wvdial, tighten your seat-belts because its going to be a hell of a ride now!

Step 3 (Don’t Panic!): Now, plug in your Reliance or Tata Indicom data card into one of your USB slots.

TARGET : Determine the name of the port you connected it to. Seems easy, doesn’t it? You’ll see …

There are 3 ways to do that – (a),(b) and (c). Start with (a) and go to the next one only if the previous one fails.

Continue reading

Ubuntu vs Fedora ?

Given a choice what will you chose, Ubuntu or Fedora ? Its one of the most arguable question among Linux Users. In this article, I try to talk about what I feel would be the best choice.

For those who have no idea about the title of this article – Ubuntu and Fedora, both are Operating Systems based on Open Source Linux Kernel. They are totally free of cost and belongs to a category called “FOSS” (Free and Open Source Software). Google for more.

I have been a frequent user of both Ubuntu and Fedora. While my laptop Dell Inspirton 1525 has both Ubuntu 9.04 Ultimate Edition 2.3 and Windows Vista Home Premium, I rarely use Windows. The only 2 things I open windows for are Microsoft Word and Gaming, because I feel that Sun’s OpenOffice is still too far behind the MS Word 2007 in terms of looks and user-friendliness and the Linux based Gaming is still in its infancy. Earlier I used to go to Windows for other needs as well like running HD Movies, using my Reliance/Tata Indicom Wireless Datacards, using Adobe PDF Reader, etc. but as soon as I grabbed the Ultimate Edition 2.3 , I almost forgot I had windows installed too!

According to my experience, Ubuntu is better than Fedora for normal desktop users. Ubuntu is officially a “home-based desktop operating system”, that is supposed to be user-friendly and provide all features that a desktop user requires like multimedia, networking, utility tools, office tools, etc. So in any case, if you’re a newuser on Linux, you should pick a flavour of Ubuntu. I’d recommend Ultimate Edition 2.3, which I am currently using. It has already got preinstalled all the softwares you’d ever need in your PC, except for games ofcourse. Even more, its looks are comparable with Windows and is more stable and user-friendly than other flavours. Besides, you can also pick among Linux Mint, Ubuntu 9.04, and others, but I don’t think anyone of them can beat Ultimate Edition in terms of preinstalled applications. Ubuntu flavours  in general, are simple, easy to use and user-friendly.

On the other hand, Fedora was actually a “sand-box” operating system when released, meant it was supposed to be for testing and experimenting Linux Softwares. It was never supposed to be for normal home based desktop users. Its meant for those who have advanced knowledge of Linux and can tweak fedora to their needs. However, with time it has incorporated lots of features meant for normal users which has made it the most widely linux OS used second only to Ubuntu.

When comparing security, both Fedora and Ubuntu provide you the same protection. Infact, any Linux based OS will give you security far better than that provided by Windows. I also include viruses, spamwares, adwares, etc while talking about security. Linux OS basically renders them non-executable in the first place, so no question arises of removing them.

All in all, I can summarize as follows :

If you’re a newcomer to Linux, use Ultimate Edition 2.3. You can also try Linux Mint, which has got even better GUI features but software-wise its little below Ultimate Edition.

For advanced users, who are ready to start off with the most stable Linux OS, just install Ubuntu 9.04 also known as “Jaunty Jackalope”. Ultimate Edition 2.3 uses Ubuntu 9.04 at its base, so I suggest its better than any other flavour. However, if you chose to install Ubuntu 9.04, you’d have to install every software, codecs you need by yourself. This may look to you as a negative point, yes it is if you don’t have a net connection, but otherwise, installing applications in Linux is as fast and simple as cutting a cake! Seriously, all you need to do is to open terminal and type the following command :
In Ubuntu :

sudo apt-get install packagename

In Fedora :

sudo yum install packagename

Thats all you have to do! Terminal will automatically download the software form the net and install it on your PC without you having to interfere in between. But you should know just one thing – the “package name”. Finding the exact package name will cose you less than 10 seconds in google.

In Ultimate Edition 2.3, you have got more than enough softwares than you’d actually need. There’s no point of having so many softwares ofcourse. I actually use less than 30% of the softwares available in Ultimate Edition.

Finally, for office users, Fedora should be the first choice. I am not sure why Fedora is best for office system, because personally I don’t find anything in Fedora that I can’t do better in Ubuntu. But still, people have their reasons to support Fedora over Ubuntu. No one has any concrete point but critics always say! Make your own choice and best of luck!

Still not sure, Click Here for answers!

Making a repository DVD in Ubuntu

In order to take the backup of all the packages I installed in my Ubuntu system, I wanted to make a portable DVD that I can use as a repository having all the packages I downloaded. After reinstalling Ubuntu, I should only insert that CD-ROM and issue the command :

sudo apt-cdrom add

This will automatically install all the packages from the CD-ROM Repository into the system and the best part – It will take care of all the dependencies by itself !! [:)]. But if you try to manually burn all the packages right from where they are stored /var/cache/apt/archives into the removable media, then when you’re reinstalling those packages , it will push you into the dependencies hell, where you will be irritated to death !

So after much googling, I was able to find out the proper way of making a Repository CD in Ubuntu. So here it goes :

1) The first thing you have to do is to become root, because all the below steps will require you to have root privileges.

To become root for this session, issue the following command :

sudo -s -H

2) Next step is to install the package apt-move. It is available in the Universe Repository. Since you’re root already, you won’t have to use sudo anymore. If you are connected to internet, run :

install apt-get apt-move

3) Now change the setting in the configuration file of apt-move located in /etc/apt-move.conf . Open it and look for COPYONLY=no and make it to COPYONLY=yes. You can change more settings in the file as you want it, but in most cases, that won’t be necessary. This change was important because if you miss to do so, then while creating the CD-Repo , it will delete all the packages from /var/cache/apt/archives. And that is not you want. NOTE : Making the above changes will require you to have root privileges. You can use vim or nano from the shell itself.

4) Now this is the time to select all the packages you want to put into your own RepoCD.By default, if you don’t do anything, all the packages inside the folder /var/cache/apt/archives will be archived. But if you want to exclude some of them, then simply delete them from the folder /var/cache/apt/archives . Don’t worry, you can safely delete them. Its just a cache of all the packages. They’re not important anymore as their binaries have already been integrated with your system.

Continue reading

Ubuntu and a Scratching noise !

Well, this might prove to be the worst night-mare for some of you long-time Ubuntu users.

My laptop has been running on Ubuntu (Hardy Heron ) for around 3-4 months. Ever since then, I’ve been ignoring an unusual noise coming from my harddisk , taking it to be the normal noise for any harddisk. But finally, I decided to google upon it, and what I found scared the hell out of me. In some cases (not all), the noise that is coming is coming due to frequent physical collision of the read/write head of your harddrive with the disc. This happens whenever the read/write head of your harddrive is parking itself more times than it should do optimally.

If you dont know about Parking, then Parking is a process by which your harddrive tries to save power. Usually, the read/write head is always roaming over the rotating metal disks, whenever the harddrive is in use. But when it is idle, the heads are “parked” or moved to a “parking place” present in the harddisk, where it can rest till they’re in need of use again. This saves power but decreases performance.

So If you’re dying to save power and you’re ready to compromise performace for that, then you should want your rw-heads to be parked whenever they finish their job. But as you know, when your computer is ON and you’re using it, then the harddisk gets very little time to rest. This is because almost every action of yours like listening to music,surfing the net,gaming,etc and other heavy-weight applications, requires harddisk for storing cache, temporary data and accessing & updating their core drivers, etc.

Even when you’re not using your computer, most of the time many other activites are going inside it, which are all scheduled using cron/anacron/etc. And if you have configured for “maximum power conservation”, then this means that you’re rw-heads are parked, then again unparked to do some job, then parked again, and again and again. And this means “frequent” collisions of your rw-heads with the discs which happens during every parking/unparking.

All this happens when the default configuration in Ubuntu harddisk driver isn’t compatible with the type of harddisk you use. The another possible reason is that your harddrive , is indeed already faulty. But If it’s not, then it is on its way of becoming one.

Continue reading