Instalasi PHP XDEBUG di Ubuntu 12.04


PHP XDEBUG di Ubuntu 12.04

“A PHP extension for powerful debugging. It supports stack and function traces, profiling information and memory allocation and script execution

Petunjuk Instalasi

Install XDebug

$ sudo  pecl install xdebug

Cari lokasi xdebug.so, ada di akhir proses instalasi yang diatas

………………………………………………….

Build process completed successfully
Installing ‘/usr/lib/php5/20100525+lfs/xdebug.so’
install ok: channel://pecl.php.net/xdebug-2.2.1
configuration option “php_ini” is not set to php.ini location
You should add “extension=xdebug.so” to php.ini

diketahui lokasinya : /usr/lib/php5/20100525+lfs/xdebug.so

Buka /etc/php5/apache2/php.ini

tambahkan di akhir php.ini :

zend_extension=”/usr/lib/php5/20100525+lfs/xdebug.so”

Masuk ke /etc/php5/conf.d/

ketikan (untuk membuat bila belum ada dan untuk mengedit bila sudah ada):

gedit 20-xdebug.ini

masukan baris2 dibawah ini (sesuaikan bila perlu) :

zend_extension=/usr/lib/php5/20100525+lfs/xdebug.so
xdebug.idekey=PHPSTORM
xdebug.remote_enable=1
xdebug.remote_port=9000
xdebug.remote_host=localhost
xdebug.profiler_enable=1
xdebug.profiler_output_dir=/var/www/tmp

Restart Apache dengan perintah

$ sudo service apache2 restart

Cek apakah XDebug sudah terpasang

# php -v
PHP 5.4.6-2~precise+1 (cli) (built: Aug 30 2012 14:38:34)
Copyright (c) 1997-2012 The PHP Group
Zend Engine v2.4.0, Copyright (c) 1998-2012 Zend Technologies
with Xdebug v2.2.1, Copyright (c) 2002-2012, by Derick Rethans

Leave a Reply

Fill in your details below or click an icon to log in:

WordPress.com Logo

You are commenting using your WordPress.com account. Log Out / Change )

Twitter picture

You are commenting using your Twitter account. Log Out / Change )

Facebook photo

You are commenting using your Facebook account. Log Out / Change )

Google+ photo

You are commenting using your Google+ account. Log Out / Change )

Connecting to %s