Home > Backend Development > PHP Tutorial > Mac+Apache+PHP installation Xdebug method steps

Mac+Apache+PHP installation Xdebug method steps

藏色散人
Release: 2023-04-08 11:30:02
forward
2692 people have browsed it

Mac+Apache+PHP installation Xdebug method steps

MAC homebrew deprecated homebrew/php since 2018/3/31

By 31st March 2018 we will deprecate and archive the Homebrew/php tap. Unfortunately we have been unable to maintain an acceptable, consistent user or contributor experience and CI workload through non-core formula taps in the Homebrew organization so we are continuing to migrate widely used formula into Homebrew/core and encourage more niche formulae and options to be supported outside the Homebrew organization.

Details: https://brew.sh/2018/01/19/homebrew-1.5.0/

So you can no longer use the following method I have installed xdebug, but the following method does not work! The following method will not work! The following method will not work!

brew install php<version number>-xdebug
Copy after login

So, to install xdebug we can manually compile it. The specific steps are as follows:

1. First enter the Xdebug official download page: https://xdebug.org/download.php , download and install the version of xdebug supported by the php version

eg. My local PHP version is 5.6.38, so I downloaded the source of 2.5.4, a tgz compressed package

2. Open the terminal in the folder where you downloaded xdebug

tar -xzf xdebug-2.5.4.tgz
cd xdebug-2.5.4
Copy after login

You can also decompress it locally, then enter the decompressed xdebug folder and open the terminal

phpize
Copy after login

#If not, write the full path to phpize

./configure
Copy after login

After the above command is executed, the compilation will start

make -j2
Copy after login

After the compilation is completed, you will be prompted that the xdebug.so file can be found in modules

Mac+Apache+PHP installation Xdebug method steps

3. Copy the xdebug.so file obtained after compilation to the folder specified by extension_dir

Note: Search in php.ini extension_dir

4. Configure the parameters in php.ini

[Xdebug]
zend_extension="/usr/local/lib/php/pecl/20131226/xdebug.so"
;自动跟踪,可关闭(关闭后提升性能)
xdebug.auto_trace=On
;性能分析,可关闭(关闭后提升性能)
xdebug.profiler_enable=On
xdebug.var_display_max_children=512
xdebug.var_display_max_data=2048
xdebug.var_display_max_depth=8
Copy after login

After modification, restart apache and check the installation with phpinfo() No, it should be no problem

For more php related knowledge, please visitphp tutorial!

The above is the detailed content of Mac+Apache+PHP installation Xdebug method steps. For more information, please follow other related articles on the PHP Chinese website!

Related labels:
source:cnblogs.com
Statement of this Website
The content of this article is voluntarily contributed by netizens, and the copyright belongs to the original author. This site does not assume corresponding legal responsibility. If you find any content suspected of plagiarism or infringement, please contact admin@php.cn
Latest Issues
php data acquisition?
From 1970-01-01 08:00:00
0
0
0
PHP extension intl
From 1970-01-01 08:00:00
0
0
0
How to learn php well
From 1970-01-01 08:00:00
0
0
0
Popular Tutorials
More>
Latest Downloads
More>
Web Effects
Website Source Code
Website Materials
Front End Template