Configure Xhprof under Mac

Source: Internet
Author: User

1: Download and install Xhprof

wget http://pecl.php.net/get/xhprof-0.9.3.tgz
Tar zxf xhprof-0.9.3.tgz
CD xhprof-0.9.3
CD extension
Phpize (execute this Code times wrong, cannot find autoconf. Please check your autoconf installation workaround See 5)

Which php-config (#找到 php-config path to this file)


./configure --with-php-config=/usr/bin/php-config #此处的地址就是上面你记录下来php address of-config


Make
Make install

2: Configure PHP.ini

php.ini file : You can update your php.ini file to automatically load your extension. Add the following to your php.ini file.

[Xhprof]

Extension=xhprof.so

;

; Directory used by default implementation of the Ixhprofruns

; Interface (namely, the Xhprofruns_default Class) for storing

; Xhprof runs.

;

Xhprof.output_dir=<directory_for_storing_xhprof_runs >

Ps:<directory_for_storing_xhprof_runs > This address is the directory used to hold the measurement records, and it will automatically come here to find the output file when the data is measured from the page output.

5: Install autoconf

Curl-o http://mirrors.kernel.org/gnu/m4/m4-1.4.13.tar.gz
TAR-XZVF m4-1.4.13.tar.gz
CD m4-1.4.13
./configure–prefix=/usr/local
Make
sudo make install


Cd..
Curl-o http://mirrors.kernel.org/gnu/autoconf/autoconf-2.65.tar.gz
TAR-XZVF autoconf-2.65.tar.gz
CD autoconf-2.65
./configure–prefix=/usr/local
Make
sudo make install

After installing autoconf, proceed to step 1.

The final installation is successful, but there is no xhprof in Phpinfo, I think the version of the extension is wrong, and PHP 5.6.3 conflict

Configure Xhprof under Mac

Contact Us

The content source of this page is from Internet, which doesn't represent Alibaba Cloud's opinion; products and services mentioned on that page don't have any relationship with Alibaba Cloud. If the content of the page makes you feel confusing, please write us an email, we will handle the problem within 5 days after receiving your email.

If you find any instances of plagiarism from the community, please send an email to: info-contact@alibabacloud.com and provide relevant evidence. A staff member will contact you within 5 working days.

A Free Trial That Lets You Build Big!

Start building with 50+ products and up to 12 months usage for Elastic Compute Service

  • Sales Support

    1 on 1 presale consultation

  • After-Sales Support

    24/7 Technical Support 6 Free Tickets per Quarter Faster Response

  • Alibaba Cloud offers highly flexible support services tailored to meet your exact needs.