• Entries (RSS)
  • Comments (RSS)

Using Facebook Graph API to keep an eye on friends activity

Posted by | Posted in Experiments, Personal, Social Networking, Virtual Private Server | Posted on 29-07-2010

Tagged Under : , , , ,

Life is really moving in the fast lane for me, and Im pretty sure for most of you readers too. I login to social-networking platforms after weeks and I cant recognize most of these faces (even though they are my friends). Its proven that Humans tend to recognize people by face more quickly then names and email addresses so whenever someone puts on a new face (uploads a new profile-picture), I have hard time getting to know them.

Well, I thought today, I have been developing in facebook application for so long now – Why not put online a few hours to fetch Facebook Friends data via API and keeping track of who did what? (status updates) and who changed his/her profile picture? So last night I was up, as usual, and I put together a small script in PHP that fetches my friends’s list, processes newcomers, checks for updates (pictures and statuses) and posts them into a database. Now I can track who updated his profile picture and what was their previous profile photo. Also, I can invest in another 1 hr to create high-level-summary everyday for ME :)

Do you do something of this sort? I’d love to hear your story

Installing Lighttpd, PHP and MySQL on Ubuntu

Posted by | Posted in How to, Linux, OpenSource, PHP, Tips and Tricks, Tutorials, Ubuntu, Virtual Private Server | Posted on 19-07-2010

Tagged Under : , , , , , , , , ,

On VPS, especially with challenging small memory limit (e.g. 64MB or 128MB) lighttpd is the best option instead of Apache. In this article I will show you how to do that. On a fresh box (which has no apache installed) type this to get lighttpd webserver installed

apt-get install lighttpd

Now install PHP5 CGI package and PHP5 command line package

apt-get install php5-cgi php5-cli

Edit the following file

nano /etc/php5/cgi/php.ini

and uncomment this line

cgi.fix_pathinfo = 1

Now enable fastcgi module

lighty-enable-mod fastcgi

Restart Lighttpd

/etc/init.d/lighttpd restart

You get the welcome page

Lets install MySQL 5.1 server and client

apt-get install mysql-server mysql-client

and optionally phpMyAdmin

apt-get install phpmyadmin

Now create a test page to see if phpinfo is all Ok

nano /var/www/info.php

Type in the following

<?php
phpinfo();

PHP Depreciated errors on Ubuntu 10.04 LTS

Posted by | Posted in How to, Linux, PHP, Tutorials, Ubuntu | Posted on 21-06-2010

Tagged Under : , , , , , ,

If you have installed LAMP (Apache, MySQL and PHP on Ubuntu 10.04 LTS) then running this on SSH

php -v

would be giving you certain PHP Depreciated warning like these

root@sea:~# php -v
PHP Deprecated:  Comments starting with '#' are deprecated in /etc/php5/cli/conf.d/idn.ini on line 1 in Unknown on line 0
PHP Deprecated:  Comments starting with '#' are deprecated in /etc/php5/cli/conf.d/imagick.ini on line 1 in Unknown on line 0
PHP Deprecated:  Comments starting with '#' are deprecated in /etc/php5/cli/conf.d/imap.ini on line 1 in Unknown on line 0
PHP Deprecated:  Comments starting with '#' are deprecated in /etc/php5/cli/conf.d/mcrypt.ini on line 1 in Unknown on line 0
PHP 5.3.2-1ubuntu4 with Suhosin-Patch (cli) (built: Apr  9 2010 08:23:39)
Copyright (c) 1997-2009 The PHP Group
Zend Engine v2.3.0, Copyright (c) 1998-2010 Zend Technologies

Its a noted bug with Ubuntu and changes may be pushed soon but to fix this just edit each of these files and replace comments starting with ‘#‘ to ‘;‘.

Install PHP5 ADOdb extension on Ubuntu

Posted by | Posted in How to, Linux, OpenSource, PHP, Tips and Tricks, Tutorials, Ubuntu | Posted on 30-05-2010

Tagged Under : , , , , ,

ADOdb library is a very good data abstraction layer for PHP. Installing a PHP extension enables the library to auto-detect this and give even better performance. To install this library on Ubuntu 10.04 LTS do this

apt-get install php5-adodb

Installing PHP’s SSH2 extension on Ubuntu

Posted by | Posted in How to, Linux, PHP, Tips and Tricks, Tutorials, Ubuntu | Posted on 27-05-2010

Tagged Under : , , , , , , , , ,

On Ubuntu 10.04 LTS, Do this (there’s no need to do any compiling anymore)

apt-get install libssh2-1-dev libssh2-php

You can now test if PHP recognizes it’s new ssh2 extension by running:

php -m |grep ssh2

Don’t forget to restart Apache

service apache2 restart

Good bye CentOS! Hello Ubuntu

Posted by | Posted in CentOS, Linux, PHP, Reviews, Tips and Tricks, Ubuntu | Posted on 15-05-2010

Tagged Under : , , , , , , , , , , , , , , , , ,

Its been about almost more then two years since I have been playing with CentOS on many different platforms etc. Its very stable but on the other hand, PHP/MySQL updates are very hard to get and still PHP is 5.1.6. I tried EPEL repo and it updated PHP to 5.3.1 but still there were conflicts with stuff and many core packages.

So, I thought why not move to Ubuntu since it has just announced 10.04LTS (Long Term Support) in April 2010. Folks at iWeb were really nice to do a reinstall without any charges and also process a memory upgrade request at an amazing 50% discount.

Ubuntu 10.04 LTS

  • Apache 2 version is 2.2.14
  • PHP version is 5.3.2
  • MySQL version is 5.1.41-3ubuntu12
  • SVN (Subversion) version is 1.6.6

As a comparison CentOS 5.4 has the following versions

  • Apache 2 version is 2.2.3
  • PHP version is 5.1.6
  • MySQL version is 5.0.77
  • SVN (Subversion) version is 1.4.2

So if you are a PHP developer looking to deploy a Linux flavour on your new box, choose Ubuntu :)

Exploring Kohana as an Alternative to CodeIgniter

Posted by | Posted in PHP, Reviews, Thoughts | Posted on 07-01-2010

Tagged Under : , , , , , ,

Brett from OnWired has written a very nice blog entry on Kohana and it is exactly what I have found Kohana to be. Hence I am sharing it here for the rest of the people to read. To view the blog entry please go here.

Kohana or CodeIgniter or CakePHP?

Posted by | Posted in PHP, Personal, Thoughts | Posted on 06-01-2010

Tagged Under : , , , , , , ,

I am going to start on a small system for internal use and I wanted to re-think my choice of CodeIgniter because it does not have templates or ORM. Guess what, I landed with KohanaPHP. It sounds very tempting that a new MVC Framework based on CodeIgniter with new features (especially ORM) is here but the documentation is really really poor.

I tried googling for a book or tutorial and I was really disappointed to have found none. I tried Amazon.com for a book but no books. Looks like I have landed in some weird space that might be good looking but I need to get my hands dirty in the code to learn it and at the end of the day, it may seem that I have lost a lot of hours on this new Framework. Lets give it a try!

Update: As of today (28th July, 2010), I am working on YII, its good, powerful and blazing fast. It has all the feature of CakePHP too.

Installing PHP 5.2.6 on CentOS box

Posted by | Posted in CentOS, How to, OpenSource, PHP, Resources, Reviews, Tips and Tricks, Tutorials | Posted on 10-07-2009

Tagged Under : , , , , , , , , ,

If you want to install PHP 5.2.x instead of the PHP 1.5.6 offered with default CentOSPlus repo. Please consider installing the utterramblings repo. Setting up this repo is a breeze … just follow these steps

Read the rest of this entry »

How to Install Apache, PHP and MySQL on CentOS

Posted by | Posted in How to, Linux, OpenSource, PHP, Resources, Tips and Tricks, Tutorials | Posted on 02-07-2009

Tagged Under : , , , , ,

I have seen people installing Apache, PHP and MySQL from source code on a production server. You should NEVER, NEVER, NEVER install these packages from source on an RPM or DEB based Linux distributions. Did I say “NEVER” enough times to make your realize that it is not a good practice?

Installing from source is bad idea; there are many reasons for this but the major one is that you will be spending a lot of time keeping the system updated. If you love installing from source then I would suggest using a different distribution e.g. Gentoo.

You can build from source if the package is not available in yum but still, try to use “yum” (or “apt-get” on Ubuntu) because it will save a lot of your time when upgrading your packages.

Read the rest of this entry »

Get Adobe Flash playerPlugin by wpburn.com wordpress themes