顯示具有 php 標籤的文章。 顯示所有文章
顯示具有 php 標籤的文章。 顯示所有文章

2013/12/12

Install php5-rrd module on ubuntu 12.04

Abstract

Since I am running php-5.4 on ubuntu 12.04, apt-get install php5-rrd is not work due to the problems of dependency. I need to do it via pecl alternatively.

Steps

1. Make sure your pecl is installed properly.
2. apt-get install php5-dev
3. pecl update-channels
4. pecl install rrd
5. cd /etc/php5/mods-available
6. cp {?.ini} rrd.ini 
//note that simply copy a file among this directory and modify the extension value to rrd.so
7. cd ../conf.d
8. ln -s ../mods-available/rrd.ini 20-rrd.ini

done

Check

php -v
php -m | grep rrd


2013/11/12

Install phpunit on ubuntu 12.04

Background
OS: ubuntu 12.04

Steps
sudo apt-get install phpunit
sudo pear upgrade pear
sudo pear channel-discover pear.symfony.com
sudo pear channel-discover pear.phpunit.de
sudo pear channel-discover components.ez.no
sudo pear channel-discover pear.symfony.com
sudo pear install --alldeps phpunit/PHPUnit

Testing
phpunit --version
PHPUnit 3.5.5 by Sebastian Bergmann.

Reference
http://www.giocc.com/installing-phpunit-on-ubuntu-11-04-natty-narwhal.html

2013/10/28

Upgrade php from 5.3 to 5.4 in Ubuntu 12.04 LTS

By default, The version of PHP in Ubuntu 12.04 LTS is 5.3. Somehow, I need the features in 5.4 so that's why I wrote it down for future reference.

Commands
`sudo add-apt-repository ppa:ondrej/php5-oldstable`
`sudo apt-get update`
`sudo apt-get install php5`

If there is warning about missing a SSH module, 
clear the contents in /etc/php5/cgi/conf.d/ssh2.ini in order to eliminate the warning