Skip to Content

develCuy's blog

by Fernando Paredes García


HOWTO Install XHProf in Ubuntu and HOWTO use in Drupal 6.x and 7.x

1. Install dependencies

# apt-get install php5-dev

2. Download xhprof source

$ cd /tmp
$ git clone git://github.com/facebook/xhprof.git

3. Install xhprof PHP extension

$ cd xhprof/extension
$ phpize
$ ./configure
$ make
# make install
# echo "extension=xhprof.so" > /etc/php5/conf.d/xhprof.ini
# echo "xhprof.output_dir=/tmp" >> /etc/php5/conf.d/xhprof.ini
# service apache2 restart

4. Install XHProf module in Drupal

a. Install in Drupal 6.x
# cp -a /tmp/xhprof/xhprof_* /var/www/
$ cd myproject
$ drush dl devel
$ go to admin/settings/devel
$ Enable profiling
$ Set xhprof directory: /var/www
$ Set XHProf URL: http://localhost/xhprof_html

b. Install in Drupal 7.x
$ cd myproject/
$ drush dl XHProf-7.x-1.x-dev
$ drush en -y xhprof
$ go to: admin/config/development/xhprof
$ Enable profiling

Blessings!


Responder

El contenido de este campo se mantiene como privado y no se muestra públicamente.
  • You can use Markdown syntax to format and style the text. Also see Markdown Extra for tables, footnotes, and more.
  • Saltos automáticos de líneas y de párrafos.
  • Las direcciones de las páginas web y las de correo se convierten en enlaces automáticamente.

Más información sobre opciones de formato

Type the characters you see in this picture. (verify using audio)
Type the characters you see in the picture above; if you can't read them, submit the form and a new image will be generated. Not case sensitive.