xhprof查看性能测试图一直报错:failed to execute cmd: " dot -Tpng"多种因素解决方案
2023-09-11 14:21:54 时间
xhprof查看性能测试图一直报错:failed to execute cmd: ” dot -Tpng”多种因素解决方案
最近在新环境进行php代码性能测试,用了xhprof这个工具,搭建好以后,点击[View Full Callgraph]查看性能分析图链接一直报错:failed to execute cmd: ” dot -Tpng”
原因一:未安装graphviz
如果看到 sh: dot: command not found ,说明服务器上没有安装画图软件graphviz
2.yum安装: yum install graphviz
源码安装到这里下载
原因二:php.ini设置了禁用proc_open方法
如果安装好了graphviz,仍然出现”failed to execute cmd”,检查下服务器上的php.ini中disable_functions这项是不是限制了proc_open,因为在xhprof_lib/utils/callgraph_utils.php的xhprof_generate_image_by_dot中使用了proc_open函数,
2.设置“disable_functions = “ 即可,一般没有必要在php.ini中关闭函数使用,人为修炼代码技术即可
相关文章
- linux - mysql 异常:MySQL Daemon failed to start.
- Invocation of init method failed; nested exception is java.lang.IllegalStateException: javax.websocket.server.ServerContainer not available
- VS2015安装 Secondary Installer Setup Failed求解决方案
- Etcd故障排除--recovering backend from snapshot error: failed to find database snapshot file (snap: snaps
- 如何处理VMware启动虚拟机时的错误信息Failed to lock the file
- MongoDB报错: Error: couldn't connect to server 127.0.0.1:27017, connection attempt failed: SocketExcep
- Installation failed with message INSTALL_FAILED_UPDATE_INCOMPATIBLE: Package com.datab.cn signatures
- 成功解决NotFoundError (see above for traceback): Failed to create a directory: ; No such file or directo
- 成功解决OpenCV Error: Assertion failed (ssize.width > 0 && ssize.height > 0) in cv::resize, file C:proj
- 关于python的mediapipe库踩过的坑-ImportError: DLL load failed while importing _framework_bindings: 找不到指定的模块。
- Mac 下python3 [SSL: CERTIFICATE_VERIFY_FAILED] certificate verify failed 解决方法
- 解决Failed toString() invocation on an object com.alibaba.fastjson.JSONException: write javaBean error
- HTTP Status 500 - Request processing failed; nested exception is org.springframework.jdbc.BadSqlGram
- 表达矩阵melt之后 画图 reshape gaochao ards 1: Unknown or uninitialised column: `p`. 2: Computation failed i