lando / docs

The main docs site for Lando
https://docs.lando.dev/
GNU General Public License v3.0
20 stars 56 forks source link

Document XHProf configuration. #102

Closed ccharlton closed 5 years ago

ccharlton commented 7 years ago

Feature request for XHProf support.

ccjjmartin commented 6 years ago

Looks like I was able to get this working with the Pantheon recipe (pantheon.yml php_version: 5.6) using these lines:

services:
  appserver:
    config:
      conf: config/php.ini
    extras:
      - apt-get update -y
      - apt-get install nano -y
      - pecl install xhprof-beta
      - docker-php-ext-enable xhprof-beta # This line might not be necessary but included anyway.

This should work without nano.

I also had to: 1) Copy the existing /usr/local/etc/php/php.ini to /app/config/php.ini 2) Edit the new php.ini to include this line: extension=xhprof.so 3) lando rebuild -y 4) lando restart -y

NOTE: This doesn't work unless you rebuild and then restart, not sure why. Hope this helps someone.

serundeputy commented 6 years ago

I think we can document this for know; and in the future it is possible to streamline having and xhprof service.

hkirsman commented 5 years ago

we have xdebug: true (at least in drupal recipes). Why not add xhprof: true?

stale[bot] commented 5 years ago

This issue has been automatically marked as stale because it has not had recent activity. It will be closed if no further activity occurs. Thank you for your contributions and please check out this if you are wondering why we auto close issues.

stephenplatz commented 5 years ago

This fails for me as per the instructions, I'm going to try to figure out what other steps may be needed

Makefile:193: recipe for target 'xhprof.lo' failed
make: *** [xhprof.lo] Error 1
ERROR: `make' failed
qzmenko commented 1 year ago

This is works for me.

services:
  appserver:
    build_as_root:
      # Install xhprof.
      - pecl install xhprof && echo "extension=xhprof.so" > $PHP_INI_DIR/conf.d/xhprof.ini
klonos commented 1 year ago

Thanks @qzmenko 🙏🏼 ...that has worked for me as well 👍🏼