Articles by Karthic

You are currently browsing Karthic’s articles.

I’m not sure if my post’s heading puts across exactly what I want to convey. Anyway, I stumbled upon a neat trick which I wanted to share with you folks.

When you usually do PHP development on Ubuntu, you will have to put your files into /var/www or whichever is your document root configured for Apache for the application to be able to run. The downside here is that, you will not always have root permission and every time you either want to add, change or remove a file, you need to do so using ‘sudo’. So what you can do is map any folder (in this case, a folder in your workspace when you use an IDE like Eclipse) to the /var/www (or your document root folder). That way your files will be visible under the /var/www folder and you can execute your files or even debug them without much hassle.

Here is what I did:

1. Go into /var folder and remove the existing www folder

cd /var
sudo rm -rf www/

2. Create a folder which you would use as your workspace

cd /home/username/
mkdir workspace/www/

I have set it up this way, so that my Java project go into workspace and all my PHP development goes into workspace/www/ folder
3. Now go back to /var folder and create the mapping

cd /var
sudo ln -s /home/username/workspace/www/

That’s it! Now you are all set. Any file you drop into /home/username/workspace/www will be automatically visible in your Apache and you can click on it to run the web application.

Please do let me know if I have done something wrong or if there is anyway to do this better.

PS: Just make sure you don’t have an index.html or something like that inside /www/. If that is there, instead of getting a folder listing you will directly be taken to that page. I think there is a configuration change in Apache that will prevent this from happening. Well, what you would like to do is up to you.

Tags: , ,

I recently stumbled upon this Data Abstraction Layer for PHP.  Here is a bit of background info: ADOdb consists of a set of classes that encapsulate frequently used methods to read and write from a database. And what is brilliant about ADOdb is that it supports all the popular DB’s in the industry that include MySQL, PostgreSQL, MS SQL, Oracle and a few others.

Please visit their site for more information on how to find something that suits your needs. Let me tempt you!

Look at what little it took for me to get data from a MySQL DB. Click here to download the required package and unzip the package into your /var/www folder or whichever folder is your document root for the Apache server

Connect($server, $user, $pwd, $db);
$rs = $DB->Execute("select * from table");

while ($array = $rs->FetchRow()) {
print_r($array);
}

The site has a lot more cooler ways of accessing the DB's. Have fun trying out different stuff!

Tags: , ,

Ubuntu has some real cool desktop effects which are aslo deeply practical. And the best part is they work flawlessly on an ordinary laptop with the built-in graphics accelerator.

To give you an example, check out the desktop cube:

CubeEffect

CubeEffect

Just follow these easy steps for a super cool looking UI:

  1. Open the Synaptics Package Manager from System/Administration/Synaptics Package Manager
  2. Use the search feature and search for the following two packages: emerald & compizconfig-settings-manager
  3. Mark them for installation and also agree to install all their dependencies
  4. Upon successful installation, open the settings manager via System/Preferences/Advanced Desktop Effects Settings

Tweak away to your satisfaction and get a really cool looking and extremely functional desktop!

Peace out :-)

Tags:

Hello folks!

I would like to shed some insight into a problem I ran into and which I think many of you would have or eventually run into.

I setup Ubuntu 8.04 LTS on my HP Compaq NX7300 laptop. I have always wanted to try out linux and I liked Ubuntu a lot. The installation was a breeze and after I setup my system, the update manager kicked in and updated my system. I plug in my Creative 24bit Live External USB sound card, Ubuntu automatically installs the drivers and I was all set. At least thats what I thought!

The sound plays brilliantly well via my Bose Companion system while I use applications such as Rythmbox or Totem. But in Firfeox, all the sound from flash sites like Youtube or Imeem was playing via the laptop speakers which was annoying. So I go to System/Preferences/Sound to look up the settings. It looked correct and the tests ran fine. I then started doing what anyone else would do – google this problem up!

I came across an excellent resource here: Simple guide to Sound Solutions for Hardy,Intrepid and Jaunty Jackalope Users

To make it easier for you folks, let me reproduce the content here:

1. Open the terminal and type the following command

sudo apt-get install asoundconf-gtk alsa-oss libasound2 libasound2-plugins padevchooser gstreamer0.10-pulseaudio ubuntu-restricted-extras

2. Close any application that may be trying to use sound and do the following:

Go to System/Preferences/Sound and set all the preferences from automatic to PulseAudio except Default Mixer Tracks which you should set to your sound card.

Go to System/Preferences/Default Sound Card and choose pulseaudio. Next, right click on the little speaker on the top panel, that is the Panel Volume Control. Click Open Volume Control and make sure it is set to the same thing as the Default Mixer Tracks in the previous step

Click on Preferences and make sure that Master and PCM and whatever else you want to control are selected. Make sure that any boxes labeled SPDIF or IEC958 are not checked. Close the Preferences box.

Push up the sliders in the volume control and make sure the little speakers do not have little red mute marks on them. Go to Applications/Sound and Video/GNOME ALSA Mixer and see if there is anything you missed because sometimes, for some cards, not all the
options are in the Panel Volume Control.

Go to Applications/Sound and Video and select Pulse Audio Device Chooser. This will put a little icon on the panel near the Panel Volume Control.

Click on the new icon and choose Volume Control. This will open the Pulse Audio Volume Control. Go to Output devices and see if your sound card is there, it will be listed as ALSA PCM on front:…(ALC8 via DMA or whatever your sound card is. If you have a usb device it will be listed as ALSA PCM on front:…(USB Audio) via DMA or something like that. Make sure the sliders are up and the device is not muted.

If any of the above is giving you problems, try rebooting.

3. Now, open Rythmbox and play something. If you have nothing handy just play one of the radio stations, you should hear something. In the Pulse Audio Volume Control/Playback you should see something like this Rythmbox: Playback Stream and some Volume sliders that you can adjust.

That did it for me. The sound now rocks! If you have more than one device and would like to configure sound to play on all devices, I would recommend you to follow the above link and get the procedure there.

Credits to the original author for creating an excellent tutorial. Hope that helps you all out.

Have fun!

Tags: , , ,

Limited View

I should not say I stumbled upon this blog.

My good friend, who incidentally happens to be my boss, and I had a little bet: he will make at least 4 blog entries a month as a part of our grand plan to put out information on the trends and happenings in the IVR world. I did expect him to begin, but what a beginning. I’m actually impressed.

Limited View: Defined by what little I see; compelled by what little I know.

There is a lot of meaning behind that definition.

Prune Everything; Prune Annually‘ is a brilliant entry. All budding entrepreneurs or even good entrepreneurs should think out of the box. Letting go of ‘bad clients’ is a very brave yet necessary move in this era of business where time matters.

Of course drawing the line between a good and a bad client requires good experience. It is here that most of them would go wrong. But unless you try it, you will never know and learning by experience, at least in my books, is the best way to learn. That is when there is no one who can offer good advice to you and this is one such a case where unless there is someone in your shoes, he cannot give you good advice.

Now I should actually look out to see if he actually makes those other posts in the future. If he does not, may be I should get him to buy me a couple of beers! :-)

Tags: ,

Greetings folks!

Welcome to the blog. I had it redesigned today!

Initially I had used a predefined template to create the site. I later installed WordPress for my blogging needs.

I found out that it is hard to make my custom static pages match the WordPress themes. I also figured that if I did match it and later changed my WordPress theme, I would have to edit my custom templates again and again.

So I revamped the whole site. WordPress runs the site now! All static content created with WordPress, so if I do change the theme, all changes will get reflected on all pages.

Please leave your suggestions and comments on how the site is now and how it can be improved in the future.

Newer entries »