web of unni

Google
 

About | GuestBook | Add WebOfUnni to Google ToolBar

May 12, 2008

Changing time zone in php info page

Filed under: php, time zone — unni @ 5:39 pm

The “precedence order” of the time zone in php is like below :
=============================================================
* The timezone set using the date_default_timezone_set() function (if any)
* The TZ environment variable (if non empty)
* The date.timezone ini option (if set)
* “magical” guess (if the operating system supports it)
* If none of the above options succeeds, return UTC
================================================================

So if you need a custom time zone in the php info page which is returned by the phpinfo function then follow the below steps :

1. Find the php.ini file

#php -i | grep php.ini

2. add the below line to it

date.timezone=Asia/Calcutta

You can get more supported time zone from

http://in.php.net/manual/en/timezones.php

3. Save the file and restart webserver, in most cases Apache

#service httpd restart

Thats All :-)

April 28, 2008

Installing Mysql from source in Ubuntu

Filed under: error, installation, mysql, ubuntu — unni @ 9:47 am

I was doing a newsletter project for my company for that i need a Web server with PHP/Mysql support, so i selected lighttpd with PHP/Mysql. I got stuck at several points while installing Mysql. I am posting the error that i encountered while installing Mysql in my ubuntu machine.

I used the Mysql source for Database installation. Downloaded the source file from :

http://dev.mysql.com/get/Downloads/MySQL-5.0/mysql-5.0.51b.tar.gz/from/http://mysql.mirror.rafal.ca/

Then configured with following command :

./configure –prefix=/usr/unni/mysql5 –with-unix-socket-path=/tmp/mysql.sock

But it ended with an error :

checking for termcap functions library… configure: error: No curses/termcap library found

Google gave me a solution at :

http://darpanetwork.blogspot.com/2008/02/compiling-mysql-on-ubuntu-linux.html

So i installed libncurses5-dev and fixed that error :

#apt-get install libncurses5-dev

Then configuration went successfully, but the make command gave another error :

====================================
g++ -DDEFAULT_BASEDIR=\”/usr/unni/mysql5\” -DDATADIR=”\”/usr/unni/mysql5/var\”" -DDEFAULT_CHARSET_HOME=”\”/usr/unni/mysql5\”" -DSHAREDIR=”\”/usr/unni/mysql5/share/mysql\”" -DDEFAULT_HOME_ENV=MYSQL_HOME -DDEFAULT_GROUP_SUFFIX_ENV=MYSQL_GROUP_SUFFIX -DDEFAULT_SYSCONFDIR=”\”/usr/unni/mysql5/etc\”" -DHAVE_CONFIG_H -I. -I. -I../include -I../include -I../include -I. -O -DDBUG_OFF -fno-implicit-templates -fno-exceptions -fno-rtti -c -o my_new.o my_new.cc
../depcomp: line 512: exec: g++: not found
make[2]: *** [my_new.o] Error 127
make[2]: Leaving directory `/usr/unni/mysql-5.0.51/mysys’
make[1]: *** [all-recursive] Error 1
make[1]: Leaving directory `/usr/unni/mysql-5.0.51′
make: *** [all] Error 2

==============================================

This time i figured out the error as the absence of basic compilers, so i installed Ubuntu build-essential, that fixed that error.

# apt-get install build-essential

But i got another error from make command :

==============================================

g++ -DDEFAULT_BASEDIR=\”/usr/unni/mysql5\” -DDATADIR=”\”/usr/unni/mysql5/var\”" -DDEFAULT_CHARSET_HOME=”\”/usr/unni/mysql5\”" -DSHAREDIR=”\”/usr/unni/mysql5/share/mysql\”" -DDEFAULT_HOME_ENV=MYSQL_HOME -DDEFAULT_GROUP_SUFFIX_ENV=MYSQL_GROUP_SUFFIX -DDEFAULT_SYSCONFDIR=”\”/usr/unni/mysql5/etc\”" -DHAVE_CONFIG_H -I. -I. -I../include -I../include -I../include -I. -O -DDBUG_OFF -fno-implicit-templates -fno-exceptions -fno-rtti -c -o my_new.o my_new.cc
../include/my_global.h:987: error: redeclaration of C++ built-in type ‘bool’
make[2]: *** [my_new.o] Error 1
make[2]: Leaving directory `/usr/unni/mysql-5.0.51/mysys’
make[1]: *** [all-recursive] Error 1
make[1]: Leaving directory `/usr/unni/mysql-5.0.51′
make: *** [all] Error 2

===================================================

Mysql forum gave me the solution :

This happened because, first the make command used the native C compiler since there was no g++ compiler ( configuration command set the compiler as gcc, because that was the available compiler ). After that i installed the g++ compiler so the next make used the g++ to compile the C code as C++ .

Solution :

Run the configuration command again followed by make :

1. ./configure –prefix=/usr/unni/mysql5 –with-unix-socket-path=/tmp/mysql.sock

2. make

3. make install

Thats done :-)

April 26, 2008

amarok installation in Ubuntu

Filed under: amarok, installation, mp3, ubuntu — unni @ 5:57 am

amarok logo Amarok is one my favorite audio player in Linux. It is stable and provides handful of features, it act as a audio player, podcast client, radio receiver and much more ………..

I tried amarok in Linux mint, it is the default player in Linux Mint, so i like to install it in Ubuntu, which is my default Operating system :-)

The installation was so easy, need of only one command

# apt-get install amarok

But after the installation i started amaroK and opened one of the mp3 song from my list, but it showed a pop up box saying “Mp3 support is not enabled”.

After some search in the forum i got the solution as to install “libxine-extracodecs”, perfect it solved it

# apt-get install libxine-extracodecs

So i started hearing my songs $$$$$$$$ :-)

Links :

http://ubuntuforums.org/showthread.php?t=513541

http://amarok.kde.org/

April 25, 2008

Ubuntu 8.04 ( Hardy Heron ) review

Filed under: Hardy Heron, review, ubuntu — unni @ 12:40 pm

ubuntu logoI am much excited to see the Ubuntu count down image that i had already posted in my site http://www.webofunni.com , changed to “Ubuntu 8.04 is here”. So i went to Ubuntu site and down loaded the torrent file from their mirror, but it disappointed me, because those torrents from their site failed. So i went to mininova and downloaded a torrent from there http://www.mininova.org/tor/1352774 , i added the torrent in my deluge torrent client and went to bed. Today morning i woke up and wrote the ISO image to a CD and rebooted the machine with the CD.

The welcome screen is tittle different from the older Ubuntu releases. The first thing i got was a graphic menu to select the language, it was already in English, so i press Esc and removed that and went to the Ubuntu menu. There was two options for live cd and installation. Thats a good idea, that will help my old, less RAM machine to install Ubuntu without the live Desktop :-)

I choose the Live cd option and went to live Desktop to try it first before installing it. It just showed the boot splash screen and a orange bar running left-right and right-left for some time and then started the progress bar, after the boot process it went to the desktop.

The new wallpaper in Ubuntu 8.04 is more pretty with a penguin created with thrown colors. I like the Wallpaper and the native theme ( Human ;-) ).

ubuntu 8.04 desktop

Then the second attraction for me, no doubt Firefox. Its in its new version with better Gnome integration, Smart bookmark, Less memory consumption and lots more …..

Next thing is the GNOME clock/weather bar, thats really amazing. We can know the time/weather of any place in the world, really cool hua! … 8-)

features of ubuntu 8.04

Other changes are in the bittorent client and CD burning tool. The default bittorent client in Hardy is Transmission , But i like deluge which is my 1st choice ;-) . The default burning tool is Brasero which looks better than the old Gnome default CD writer.

Now i can see more options in Firefox Plugin selector, For example lets see the Flash plugin, there are many players to select from …

Firefox plugin in ubuntu 8.04

All the applications are in its newest version Gaim >> Pidgin 2.4.1

Gimp >> Gimp 2.4.5 … Thats really nice to see the new versions ;-)

As usual proprietary codecs are not installed in this version of Ubuntu, but the pop up window will suggest the codec when you click on the audio file which needs proprietary codec, you need to install the codec using the package manager, as usual ;-)

So, just order a CD at shipit or download and install this advanced/user friendly OS… Ubuntu :-)

Reference :

http://www.ubuntu.com/

http://www.ubuntu.com/products/whatisubuntu/804features/

https://wiki.ubuntu.com/HardyHeron

http://www.ubuntu.com/news/ubuntu-8.04-lts-desktop

https://shipit.ubuntu.com/

http://www.ubuntu.com/getubuntu/download

April 24, 2008

live cd problem in Linux Mint 4.0 Daryna

Filed under: Daryna, X, graphics, linux mint, linux screen resolution — unni @ 6:08 pm

linux mint I was just trying the new version of Linux Mint in my new machine with built in nVidia card. I put the CD and configured my BIOS to boot from the CD. It showed the Linux Mint welcome page and then the Boot splash screen. But it disappointed me when it came to the login screen. My monitor just shows that “Out of range”.I got the same problem with Ubuntu 7.10. This version of Linux Mint was based on that Ubuntu release but i thought that they may have removed this bug, but that was there.

So i mounted the ubuntu 7.04 / partition which was already installed in my system. They i compared the /etc/X11/xorg.conf of both distro and found that there was some difference in the horizontal and vertical synchronization value of monitor also the resolution option was not there in Linux Mint X configuration, so i edited the file and updated/added some values like below :

======================================

Section “Monitor”
Identifier “Generic Monitor”
Option “DPMS”
HorizSync 28-51
VertRefresh 43-60

EndSection

Section “Screen”
Identifier “Default Screen”
Device “Generic Video Card”
Monitor “Generic Monitor”
DefaultDepth 24
SubSection “Display”
Depth 24
Modes “1024×768″ “800×600″ “640×480″
EndSubSection

EndSection
=========================================

Also i booted the live cd with nosplash noapic noacpi — option

1. Boot from the CD.

2. Press F6 at the welcome screen replace the option “quiet splash –” with “nosplash noapic noacpi –”

3. Press “Enter” to boot

4. Press Ctrl+Alt+F1 and go to terminal and then switch to root using “sudo su”.

5. Open the /etc/X11/xorg.conf file and add/update the file ( the section that i marked as bold in the above example. )

Then go to the graphical screen by pressing Ctrl+Alt+F7 then force logout the mint user by pressing Ctrl+Alt+BackSpace. Then wait for some seconds to autologin the mint user. I got fixed My issue, hope this will help you also, Just try ;-)

Reference :

http://www.linuxmint.com/

http://www.linuxmint.com/rel_daryna.php

Next Page �

Created and maintained by Unnikrishnan
Hosted by Host cats