Windows 7 Sins
After going through ubuntu forum i found
The site tells why you should not use windows.

After going through ubuntu forum i found
The site tells why you should not use windows.

Today i instaleld Twitter Tools plugin for this blog. After instllation, you need to go to configuration page of Twitter Tools, then provide your twiter login user name and passwod, Twitter Tools will test your account, then you need to specify some settings and save. Now you are good to go.
Tags: wordpress, wordpress plugin, wordpress twitter
Category: Web
I created an OpenVZ vps with ubuntu template ubuntu-9.10-x86.tar.gz
After login to VPS, there was no networking enabled in the VPS
root@server70 [/vz/template/cache]# vzctl enter 102 entered into CT 102 root@hosthat:/# ifconfig root@hosthat:/# ping yahoo.com ping: unknown host yahoo.com root@hosthat:/#
Whrn i restarted networking, i got error
root@hosthat:/# /etc/init.d/networking restart * Reconfiguring network interfaces... /etc/network/interfaces:15: interface lo declared allow-auto twice ifdown: couldn't read interfaces file "/etc/network/interfaces" /etc/network/interfaces:15: interface lo declared allow-auto twice ifup: couldn't read interfaces file "/etc/network/interfaces" [fail] root@hosthat:/#
It says
/etc/network/interfaces:15: interface lo declared allow-auto twice
I checked file /etc/network/interfaces and found two entry for lo
root@hosthat:/dev# cat /etc/network/interfaces # This configuration file is auto-generated. # WARNING: Do not edit this file, otherwise your changes will be lost. # Please edit template /etc/network/interfaces.template instead. auto lo iface lo inet loopback address 127.0.0.1 netmask 255.0.0.0 broadcast 127.255.255.255 up ip route replace 127.0.0.0/8 dev lo # Auto generated interfaces auto lo iface lo inet loopback auto venet0 iface venet0 inet static address 127.0.0.1 netmask 255.255.255.255 broadcast 0.0.0.0 up route add -net 192.0.2.1 netmask 255.255.255.255 dev venet0 up route add default gw 192.0.2.1 auto venet0:0 iface venet0:0 inet static address 67.228.104.123 netmask 255.255.255.255 broadcast 0.0.0.0 root@hosthat:/dev#
This is fixed by commenting lo entry in file /etc/network/interfaces.template
root@hosthat:/dev# cat /etc/network/interfaces.template auto lo iface lo inet loopback address 127.0.0.1 netmask 255.0.0.0 broadcast 127.255.255.255 up ip route replace 127.0.0.0/8 dev lo root@hosthat:/dev# vi /etc/network/interfaces
After commenting, the file content look like
#auto lo #iface lo inet loopback # address 127.0.0.1 # netmask 255.0.0.0 # broadcast 127.255.255.255 # up ip route replace 127.0.0.0/8 dev lo
After rebooting, network interfaces started working properly.
root@hosthat:/# ifconfig lo Link encap:Local Loopback inet addr:127.0.0.1 Mask:255.0.0.0 inet6 addr: ::1/128 Scope:Host UP LOOPBACK RUNNING MTU:16436 Metric:1 RX packets:30 errors:0 dropped:0 overruns:0 frame:0 TX packets:30 errors:0 dropped:0 overruns:0 carrier:0 collisions:0 txqueuelen:0 RX bytes:2550 (2.5 KB) TX bytes:2550 (2.5 KB) venet0 Link encap:UNSPEC HWaddr 00-00-00-00-00-00-00-00-00-00-00-00-00-00-00-00 inet addr:127.0.0.1 P-t-P:127.0.0.1 Bcast:0.0.0.0 Mask:255.255.255.255 UP BROADCAST POINTOPOINT RUNNING NOARP MTU:1500 Metric:1 RX packets:316733 errors:0 dropped:0 overruns:0 frame:0 TX packets:168152 errors:0 dropped:0 overruns:0 carrier:0 collisions:0 txqueuelen:0 RX bytes:473833406 (473.8 MB) TX bytes:9101935 (9.1 MB) venet0:0 Link encap:UNSPEC HWaddr 00-00-00-00-00-00-00-00-00-00-00-00-00-00-00-00 inet addr:67.228.104.123 P-t-P:67.228.104.123 Bcast:0.0.0.0 Mask:255.255.255.255 UP BROADCAST POINTOPOINT RUNNING NOARP MTU:1500 Metric:1 root@hosthat:/#
Tags: openvz network, ubuntu network
Category: OpenVZ
Google Chrome have Text to Speech extension, that make it easy to listen to web pages instead of reading the page. You can install the extension from.
https://chrome.google.com/extensions/detail/jbldhmenlfmbooleglopeplanhpmhmje
tts use web based google tts, so it is little slow, you need to wait few seconds before the sound starts. It is not perfect but acceptable. Not bad as festival tts.
I tested on windows and ubuntu. Both worked fine.
Tags: Google Chrome, speak, tts
Category: ubuntu
You can use netstat or fuser commands to find out which program is using a port. You can find used ports with command nmap
[root@server52 ~]# nmap localhost Starting Nmap 4.20 ( http://insecure.org ) at 2010-03-24 07:14 EDT Interesting ports on localhost.localdomain (127.0.0.1): Not shown: 1691 closed ports PORT STATE SERVICE 110/tcp open pop3 111/tcp open rpcbind 143/tcp open imap 3333/tcp open dec-notes 10082/tcp open amandaidx 10083/tcp open amidxtape Nmap finished: 1 IP address (1 host up) scanned in 0.047 seconds [root@server52 ~]#
I found port 10082 used by some program. To find out what program is using this port, run
[root@server52 ~]# netstat -nlp |grep 10082 tcp 0 0 0.0.0.0:10082 0.0.0.0:* LISTEN 22157/lighttpd [root@server52 ~]#
To get process id, run
[root@server52 ~]# fuser -n tcp 10082 10082/tcp: 22157 [root@server52 ~]#
Now we got process id of program that is using port 10082.
To find more details about the program, run
[root@server52 ~]# ps aux|grep 22157 root 9299 0.0 0.0 61188 736 pts/0 S+ 07:16 0:00 grep 22157 zend 22157 0.0 0.0 27232 588 ? Ss Mar22 0:35 /usr/local/zend/gui/lighttpd/sbin/lighttpd -m /usr/local/zend/gui/lighttpd/lib -f /usr/local/zend/gui/lighttpd/etc/lighttpd.conf -D [root@server52 ~]#
You can also find details by going to /proc/PID folder.
[root@server52 ~]# cd /proc/22157 [root@server52 22157]# ls -la total 0 dr-xr-xr-x 5 zend zend 0 Mar 23 23:31 . dr-xr-xr-x 143 root root 0 Mar 21 15:39 .. dr-xr-xr-x 2 zend zend 0 Mar 24 07:02 attr -r-------- 1 root root 0 Mar 24 07:02 auxv -r--r--r-- 1 root root 0 Mar 24 07:02 cmdline -rw-r--r-- 1 root root 0 Mar 24 07:02 coredump_filter -r--r--r-- 1 root root 0 Mar 24 07:02 cpuset lrwxrwxrwx 1 root root 0 Mar 24 07:01 cwd -> /etc/rc.d/init.d -r-------- 1 root root 0 Mar 24 07:02 environ lrwxrwxrwx 1 root root 0 Mar 24 07:01 exe -> /usr/local/zend/gui/lighttpd/sbin/lighttpd dr-x------ 2 root root 0 Mar 24 06:01 fd -r--r--r-- 1 root root 0 Mar 24 07:02 io -r-------- 1 root root 0 Mar 24 07:02 limits -rw-r--r-- 1 root root 0 Mar 24 07:02 loginuid -r--r--r-- 1 root root 0 Mar 24 07:01 maps -rw------- 1 root root 0 Mar 24 07:02 mem -r--r--r-- 1 root root 0 Mar 24 07:02 mounts -r-------- 1 root root 0 Mar 24 07:02 mountstats -r--r--r-- 1 root root 0 Mar 24 07:02 numa_maps -rw-r--r-- 1 root root 0 Mar 24 07:02 oom_adj -r--r--r-- 1 root root 0 Mar 24 07:02 oom_score lrwxrwxrwx 1 root root 0 Mar 24 07:01 root -> / -r--r--r-- 1 root root 0 Mar 24 07:02 schedstat -r-------- 1 root root 0 Mar 24 07:02 smaps -r--r--r-- 1 root root 0 Mar 24 06:49 stat -r--r--r-- 1 root root 0 Mar 24 06:49 statm -r--r--r-- 1 root root 0 Mar 24 06:46 status dr-xr-xr-x 3 zend zend 0 Mar 24 06:01 task -r--r--r-- 1 root root 0 Mar 24 07:02 wchan [root@server52 22157]# cat cmdline /usr/local/zend/gui/lighttpd/sbin/lighttpd-m/usr/local/zend/gui/lighttpd/lib-f/usr/local/zend/gui/lighttpd/etc/lighttpd.conf-D[root@server52 22157]#
The port is used by lighttpd, that is part of Zend Server Community edition. I had installed it few days ago. So nothing to worry about it.
Tags: fuser, netstat, pid, process id
Category: Linux
When i install ffmpeg-php on a plesk server, i got following error
PHP Warning: PHP Startup: Unable to load dynamic library '/usr/lib/php/modules/ffmpeg.so' - /usr/lib/php/modules/ffmpeg.so: undefined symbol: php_gd_gdImageSetPixel in Unknown on line 0
This is caused by loading ffmpeg.so before gd.so
To fix the error, i edited
vi /etc/php.d/gd.ini
added following as last line
extension=ffmpeg.soSymfony is a PHP RAD framework like Zend Framework, CakePHP, etc… They have been using subversion for version control. Today while checking language section of github.com, i found Symfony version 2 is using git for source control.
See the announcement at symfony blog
http://www.symfony-project.org/
Other opensource project like CakePHP, Gallery 2, etc.. are using git for source control.
Pro Git is git book, that is available in print and online. Online version is free to use, can be found at
On ubuntu , when i run git svn, i get following error
root@hostonnet:/usr/local/zend/share# git svn clone http://framework.zend.com/svn/framework/standard/trunk git: 'svn' is not a git-command. See 'git --help'. root@hostonnet:/usr/local/zend/share#
This is fixed by installing git-svn
sudo apt-get install git-svn