Activate Oracle on XAMPP for Windows

With the default installation of XAMPP for Windows, we don’t get PHP Oracle connectivity enabled. This can be enabled easily when you need to connect to a Oracle Database from your PHP application/script. PHP has got the OCI8 extension, which provides Oracle connectivity to PHP application, and OCI8 uses Oracle Instant Client Package to get Oracle specific functions.

I had the need to connect to a Oracle Database from a PHP script in one of my recent projects, the following is what I did to enable Oracle connectivity in XAMPP for Windows.

  1. In your XAMPP Start Page, go to phpinfo, look for string oci8. If string found it indicate that connection to oracle is available, otherwise to activate connection do the following steps:
  2. Open the currently used php.ini file by looking at the phpinfo, from the XAMPP folder.
  3. Find string ;extension=php_oci8.dll. Remove the semicolon (;) ahead of the string to activate the oracle extension.
  4. Save the php.ini file.
  5. Download the “Instant Client Package – Basic” for Windows from the OTN Instant Client page. Unzip it to c:\instantclient_11_1
  6. Edit the PATH environment setting and add c:\instantclient_11_1 before any other Oracle directories. For example, on Windows XP, follow Start -> Control Panel -> System -> Advanced -> Environment Variables and edit PATH in the System variables list.
  7. Set desired Oracle globalization language environment variables such as NLS_LANG. If nothing is set, a default local environment will be assumed. See An Overview on Globalizing Oracle PHP Applications for more details.
  8. Unset Oracle variables such as ORACLE_HOME and ORACLE_SID, which are unnecessary with Instant Client (if they are set previously).
  9. Restart XAMPP (or Start if its not already started).
  10. To make sure that connection to oracle database has successfully activated, go to phpinfo. Find string: oci8. If found, then XAMPP can now communicate with Oracle Database.

The steps to do the same in a Linux box are almost similar, except there you will use the Linux versions of the packages and setting PATH variables would be different.

You can ping me back with a comment if you run into any issues, I might be able to help you or I can learn from you.

Reference:

Posted in Tech Notes | Tagged , , , , , | 5 Comments

Happy Birthday Blogger

On this day in 1999, Pyra Labs launched Blogger. Blogger was later bought by Google in 2003.

I have been blogging with Blogger for the last 3 years in this blog, and also in my Tamil blog. It has been a wonderful experience for me with Blogger, (though I prefer WordPress these days).

Congratulations to Google on 10 years for Blogger.

Posted in Tech News | Tagged , , | 2 Comments

Free calls to US using Google Voice & Gizmo (with IPKall or a Friend in US)

[Update: Gizmo5 has been acquired by Google and so new user sign-up has been suspended. Use CallCentric.com to get a SIP number instead of Gizmo5 and Express Talk instead of Gizmo5 client. Gmail can also be used as a client for Google Voice. An updated guide can be found at Digital Inspiration, titled Get Google Voice from Outside the U.S.]

So how did I get my Google Voice number from outside US… Yeah I live in Sri Lanka, and I have registered my Google Voice number and use it without any restrictions…!

Google Voice is a wonderful service that functions like a virtual phone switchboard, and you can manage calls and route them to your various phones, voice mail, etc. It gives you a free phone number that can receive regular phone calls and route them to any other actual phones you have connected to your account.

Unfortunately, currently its forwarding abilities are limited only to US phones. Also you are not allowed to access service registration when you are outside US. But I was able to do some workaround with the help of couple of online guides to create my own Google Voice number.

How to signup to Google Voice?
Currently its only by ‘invite mode’ but you can get an invitation within a week or so. During the signup process you will be required to verify your account via a US telephone number.

How to access the Google Voice website for signup from outside US? (After you are signed-up you are allowed to access even from outside US)

  1. Get a friend of your’s in US to do this.
  2. Use a SOCKS Tunnel to access. (I won’t suggest this as its risky, also web based proxies won’t help)

How to get a US number and verify it when you are outside US?

  1. Get a friend of your’s in US to add his home number and verify it for you.
  2. Buy a US number as a CallIn number on Gizmo, or any other similar providers, (priced around 10 – 20 $). (Callcentric, Voxalot)
  3. Get a free US number from IPKall (forwarded to Gizmo or any other VoIP service) that can be added to Google Voice signup.

How to connect this with Gizmo?

  • Register for a free Gizmo account and get your Gizmo number (which is a SIP number, that can be used on any SIP client, on PC, on mobiles, on ATA devices)
  • Add your Gizmo number in your Google Voice settings page.
  • Add your Google Voice number in your My Gizmo page.

What I have got now?

  • I have a Gizmo account I can add to any SIP enabled device.
  • I have a IPKall number which is also a US phone number forwarded to my Gizmo account, but I’m not going to use that at all.
  • I have a Google Voice number (thats what we wanted to have…!).
  • Any one can call my US number 540-IMN-IMAL (540-466-4625), and it will ring in my Gizmo phones, SIP applications or any other device. Its free for me.
  • I can call any US (& Canada?) numbers for free, (at least for 3 minutes).

Thats how I got my nice Google Voice number. I’m ready to help you if you want to get your own Google Voice number, just leave a comment.

Further Reading:

  1. Gizmo Voice – A mashup using Gizmo5 and Google Voice
  2. Adding a Gizmo number to Google Voice
  3. Taking calls from Gizmo
  4. Google Voice from Wikipedia
Posted in Tech Notes | Tagged , , | 3 Comments

Using the ‘exclude’ option with ‘tar’

I’m always confused with the use of ‘exclude’ options with ‘tar’. Here I’m sharing a few tips I found online, just in case it might help you. The meanings of –exclude and –exclude-from are always confusing:

  • Use –exclude when files to be excluded are given as a pattern on the command line.
  • Use –exclude-from to introduce the name of a file which contains a list of patterns, one per line; each of these patterns can exclude zero, one, or many files.

When using –exclude=pattern, be sure to quote the pattern parameter, so GNU tar sees wildcard characters like ‘*’.

For example, write:

$ tar -c -f <em>archive.tar</em> --exclude '*.o' <em>directory</em>

tar does not act on a path name explicitly listed on the command line if one of its file name components is excluded. If files that end with ‘*.o’ are excluded when creating an archive, but explicitly name the file ‘dir.o/foo’ after all the options have been listed, ‘dir.o/foo’ will be excluded from the archive.
Only shell syntax, or globbing will work with exclude options in tar. The command might fail if regexp syntax is used to describe files to be excluded in the command.

Reference:

Posted in Tech Notes | Tagged | Comments Off

Geocities web sites to Internet Archive – An Effort to Save the History of Personal Web

GeoCities has been an important platform for personal web sites since the early days of Web. With the recent news from Yahoo that GeoCities is going to be discontinued on October 26, 2009, the Internet Archive, a nonprofit founded to build an Internet library and archive the public Web, is working over the next few months to ensure their collection of GeoCities sites is as deep and thorough as possible.

We can help in this effort by suggesting know Goecities sites, which are no more maintained, but have useful content of value or even your own historical Geocities page!

See details or submit your site for indexing!

Posted in Tech News | Tagged | Comments Off