Skip to content

Instantly share code, notes, and snippets.

@rwohleb
Forked from msonnabaum/gist:1306569
Last active December 14, 2015 17:18
Show Gist options
  • Save rwohleb/5120844 to your computer and use it in GitHub Desktop.
Save rwohleb/5120844 to your computer and use it in GitHub Desktop.
XHProf on PHP5.3 in MAMP 1.9
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/php5.3/bin/phpize
MACOSX_DEPLOYMENT_TARGET=10.6 CFLAGS="-arch i386 -arch x86_64 -g -Os -pipe -no-cpp-precomp" CCFLAGS="-arch i386 -arch x86_64 -g -Os -pipe" CXXFLAGS="-arch i386 -arch x86_64 -g -Os -pipe" LDFLAGS="-arch i386 -arch x86_64 -bind_at_load"
export CFLAGS CXXFLAGS LDFLAGS CCFLAGS MACOSX_DEPLOYMENT_TARGET
./configure
make
cp modules/xhprof.so $(/Applications/MAMP/bin/php5.3/bin/php-config --extension-dir)/
echo "extension=xhprof.so" >> /Applications/MAMP/conf/php5.3/php.ini
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment