Why & How To Update From PHP 5.3.x to 5.5.x On Ubuntu 12.04!

Why Upgraade to PHP 5.4.x on  Ubuntu?

Why Upgraade to PHP 5.4.x on  Ubuntu?

Longback I have installed PHP 5.3 on my Ubuntu and I started working on MySQL databases. Today I tried to access MySQL data using
To my vast surprise, php thrown an error at me. PHP 5.3.x doesn't have MyQL native drivers. So, I cannot use the above command. Now I have to use fetch_assoc() to access data or I have to upgrade to PHP 5.4.x. So I updated PHP to latest version.

If you want to update, you can use the following commands in your terminal.
sudo apt-get update && sudo apt-get install python-software-properties
sudo add-apt-repository ppa:ondrej/php5
sudo add-apt-repository ppa:ondrej/php5-oldstable
sudo apt-get update && sudo apt-get dist-upgrade
Now try this
php -v

This will show about the version of php currently available on your localhost.

So, You have upgraded to PHP 5.4.x, You can use mysqli_result::fetch_all() directly!

I am Chillar Anand. I daydream a lot and write about the things that interest me here. You can read more about this blog here.

See all articles


Edit this page