Install php 5.2 in Ubuntu

May 21, 2008 on 3:36 am | In PHP | No Comments

Installing PHP 5.2

Adding the Dotdeb repository

We’re going to add the Dotdeb repository, which will provide the latest versions of PHP for Debian. We need to modify the sources.list file by running the following command

vi /etc/apt/sources.list

Once you have sources.list file open, add the two following lines

deb http://packages.dotdeb.org stable all
deb-src http://packages.dotdeb.org stable all

Now let’s update the packet database to add those of Dotdeb. The version of Dotdeb packets being always superior to those of Debian, the Dotdeb versions will be automatically selected during the installation of PHP

Installing PHP 5

After having added the Dotdeb repository, we can move on to installing PHP:

apt-get install php5-mysql
apache2ctl restart

Test PHP by checking the phpinfo page

No Comments yet »

RSS feed for comments on this post. TrackBack URI

Leave a comment