网站首页 > 教程分享 正文
本篇文章主要讲述的是在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的文件夹里打开终端
-xzf xdebug-.
也可以在本地直接解压,再进入解压的xdebug的文件夹里,打开终端
phpize
#如果不可以,写phpize的完整路径
./configure
上面命令执行之后,开始编译
make -j2
编译完成之后,会提示,在modules可找到xdebug.so文件
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=On
xdebug.var_display_max_children=512xdebug.var_display_max_data=2048xdebug.var_display_max_depth=8
修改完之后,重启apache,phpinfo()检测一下安装上了没,应该是没问题了
相关视频:PHP视频教程
以上就是Mac系统下用Apache和PHP安装Xdebug详细流程的详细内容,更多请关注其它相关文章!
更多技巧请《转发 + 关注》哦!
猜你喜欢
- 2024-10-27 安装Apache-php项目运行的lamp环境搭建
- 2024-10-27 我的HTML+php学习第十八天——Apache,域名配置下
- 2024-10-27 CentOS7编译安装PHP7的详细教程(图文)
- 2024-10-27 CentOS7 - 安装Apache HTTP Server和PHP
- 2024-10-27 Windows安装PHP8+Apache+JIT(即时编译)
- 2024-10-27 CentOS7如何安装最新版PHP7?Nginx或Apache该如何配置?
- 2024-10-27 phpstudy中apache无法启动怎么解决?
- 2024-10-27 使用Dockerfile基于7.4-apache-buster镜像搭建php7.4微服务环境
- 2024-10-27 windows下的Apache+php+pdo+SQL server环境配置
- 2024-10-27 全能PHP自定义环境,IIS、Apache、Nginx三大站点多版本共存
你 发表评论:
欢迎- 最近发表
- 标签列表
-
- css导航条 (66)
- sqlinsert (63)
- js提交表单 (60)
- param (62)
- parentelement (65)
- jquery分享 (62)
- check约束 (64)
- curl_init (68)
- sql if语句 (69)
- import (66)
- chmod文件夹 (71)
- clearinterval (71)
- pythonrange (62)
- 数组长度 (61)
- javafx (59)
- 全局消息钩子 (64)
- sort排序 (62)
- jdbc (69)
- php网页源码 (59)
- assert h (69)
- httpclientjar (60)
- postgresql conf (59)
- winform开发 (59)
- mysql数字类型 (71)
- drawimage (61)
本文暂时没有评论,来添加一个吧(●'◡'●)