您的位置 首页 php

Mac+Apache+PHP安装Xdebug方法步骤

MAC homebrew自2018/3/31之后弃用homebrew/php

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 organisation so we are continuing to migrate widely used formulae into Homebrew/core and encourage more niche formulae and options to be supported outside the Homebrew organisation.

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

所以不能再用下面的方法安装xdebug了,下面的方法不行!下面的方法不行!下面的方法不行!

brew install php<version number>-xdebug

所以,安装xdebug我们可以手动编译一下,具体步骤如下:

1.首先进入 Xdebug 官方下载页面:https://xdebug.org/download.php,下载安装php版本支持的xdebug的版本

eg.我本地的PHP版本是5.6.38,所以下载了2.5.4的source,一个tgz压缩包

2.在下载xdebug的文件夹里打开终端

tar -xzf xdebug-2.5.4.tgzcd xdebug-2.5.4

也可以在本地直接解压,再进入解压的xdebug的文件夹里,打开终端

phpize

#如果不可以,写phpize的完整路径

./configure

上面命令执行之后,开始编译

make -j2

编译完成之后,会提示,在modules可找到xdebug.so文件

faed9245dcd9cc63a927ceac0283e52.png

3.将编译之后得到的xdebug.so文件可以拷贝到extension_dir规定的文件夹中

注:php.ini 中搜索extension_dir

4.在php.ini中配置一下参数

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

修改完之后,重启apache,phpinfo()检测一下安装上了没,应该是没问题了

更多php相关知识,请访问php教程!

以上就是Mac+Apache+PHP安装Xdebug方法步骤的详细内容,更多请关注求知技术网其它相关文章!

文章来源:智云一二三科技

文章标题:Mac+Apache+PHP安装Xdebug方法步骤

文章地址:https://www.zhihuclub.com/1880.shtml

关于作者: 智云科技

热门文章

发表评论

您的电子邮箱地址不会被公开。

17条评论

  1. What a information of un-ambiguity and preserveness of precious knowledge regarding unexpected emotions. Henrietta Reuben Freida

  2. Good post! We are linking to this great content on our website. Keep up the great writing. Irene Oliviero Sopher

  3. Pretty! This has been an extremely wonderful article. Thanks for supplying these details. Malva Husein Emelita

  4. An interesting discussion is definitely worth comment. I do think that you should publish more about this subject matter, it might not be a taboo subject but usually people do not discuss these issues. To the next! Best wishes. Leoline Rudd Templeton

  5. Greetings! Very helpful advice in this particular post! It is the little changes that will make the largest changes. Many thanks for sharing! Tine Mallory Swartz

  6. My arrival will be on April 11 or 12, 2019. I might need it until April 14, 2019. So 2-3 days please quote me. Self driving. Thank you. Roxi Nikolaos Fleda

  7. You ought to be a part of a contest for one of the greatest websites on the internet. Janelle Aksel Booma

  8. Hi, aftr reding this amazijg post i am as well happy too sharte my knowledge here with friends. Alana Seth Georgy

  9. Thanks for ones marvelous posting! I truly enjoyed reading it, you will be a great author. I will make sure to bookmark your blog and definitely will come back from now on. I want to encourage one to continue your great work, have a nice holiday weekend!| Shir Birk Obe

  10. P, you have a good skincare routine, but I would suggest a couple of tweaks: Danyette Konrad Gusti

  11. I have been browsing online more than 3 hours today, yet I never found any interesting article like yours. It is pretty worth enough for me. In my view, if all webmasters and bloggers made good content as you did, the net will be a lot more useful than ever before. Timmi Hersh Herod

  12. I like reading through a post that can make men and women think. Also, thanks for allowing me to comment! Petrina Mordecai Jevon

  13. I really like it whenever people come together and share ideas. Great website, stick with it! Eada Steward Philippa

  14. Can I simply say what a reduction to seek out somebody who actually knows what theyre talking about on the internet. You definitely know tips on how to convey an issue to mild and make it important. More people have to learn this and perceive this side of the story. I cant imagine youre no more standard since you definitely have the gift. Willie Agosto Yalonda

  15. That looks fabulous. I love apple desserts in the fall. Thank y0u for sharing! Rosanna Loren Soneson

  16. A fascinating discussion is definitely worth comment. I believe that you should write more about this subject matter, it might not be a taboo matter but usually people do not discuss these subjects. To the next! All the best!! Carine Welbie Cohbert

网站地图