Wednesday, October 13, 2010

What is PDO?

PDO is an acronym for PHP Data Objects. PDO is a lean, consistent way to access databases. This means developers can write portable code much easier. PDO is not an abstraction layer like PearDB. PDO is a more like a data access layer which uses a unified API (Application Programming Interface).

Friday, October 8, 2010

Handling White Screen of Death in PHP

Occasionally a site user or developer will navigate to a page and suddenly the page content disappears, and is completely blank. No content. No errors. Nothing. This is what is referred to as the White Screen of Death or WSOD.

Work around for this problem is to add the following in beginning of PHP code:

ini_set(“session.save_handler”, “files”);

The “save_handler” is just defined in php.ini with value “files”, redefining the save_handler before calling session_start() solves the problem.

configure Tata Indicom Photon+

* Login as a root user
* Connect the USB device
* Open terminal (Application > accessories> Terminal)
* install wvdial using the command sudo apt-get install wvdial
* After installation again type sudo gedit /etc/wvdial.conf on terminal , which will open the configuration file.
* Enter the following details in configuration file


[Dialer Defaults]
Modem = /dev/ttyUSB0
Init1 = ATZ
Phone = #777
Username = xxxxxxxxxx (your tata photon number)
Password = xxxxxxxxxx (your tata photon number)
New PPPD = yes
Stupid Mode = 1

* Now close the configuration file and type sudo wvdial. You should see a long list of arbit codes followed by some IPs. If you see the IPs then you are connected! Don’t close the terminal, or else you’ll get disconnected. To manually disconnect, just go to the terminal and press Ctrl+C.