Skip to content

Instantly share code, notes, and snippets.

@msonnabaum
Created October 22, 2011 22:28
Show Gist options
  • Save msonnabaum/1306569 to your computer and use it in GitHub Desktop.
Save msonnabaum/1306569 to your computer and use it in GitHub Desktop.
install xhprof on mamp for php 5.3
wget http://pecl.php.net/get/xhprof-0.9.2.tgz
tar -xzf xhprof-0.9.2.tgz
cd xhprof-0.9.2/extension
/Applications/MAMP/bin/php/php5.3.6/bin/phpize
./configure
make
cp modules/xhprof.so $(/Applications/MAMP/bin/php/php5.3.6/bin/php-config --extension-dir)/
echo "extension=xhprof.so" >> /Applications/MAMP/bin/php/php5.3.6/conf/php.ini
@jessebeach
Copy link

At the phpize step, I go this output

Jesse-Beachs-MacBook-Pro:extension jbeach$ /Applications/MAMP/bin/php/php5.3.6/bin/phpize ./configure grep: /Applications/MAMP/bin/php/php5.3.6/include/php/main/php.h: No such file or directory grep: /Applications/MAMP/bin/php/php5.3.6/include/php/Zend/zend_modules.h: No such file or directory grep: /Applications/MAMP/bin/php/php5.3.6/include/php/Zend/zend_extensions.h: No such file or directory Configuring for: PHP Api Version: Zend Module Api No: Zend Extension Api No: configure.in:3: warning: prefer named diversions configure.in:3: warning: prefer named diversions

@msonnabaum
Copy link
Author

Looks like you need the "MAMP components" for this to work: MAMP Server components and libraries

@cam8001
Copy link

cam8001 commented May 24, 2013

I have pre-compiled binaries here: https://github.com/cam8001/php-xhprof-mamp

@kepol
Copy link

kepol commented Jan 27, 2014

I got the same output as jessebeach even after configuring the MAMP Server components and libraries, but xhprof works all the same.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment