0
点赞
收藏
分享

微信扫一扫

Centos7 xhprof

迎月兮 2022-07-29 阅读 125

服务器环境

系统:Centos7
PHP:PHP 5.6.31
xhprof:xhprof0.9.4
graphviz:2.46.0

软件下载

xhprof

PHP版本 xhprof版本
5.6+ 0.9.0 | 0.9.1 | 0.9.2 | 0.9.3
7.4+ 2.1.2 | 2.1.3 | 2.1.4 | 2.2.0
8.0+ 2.2.1 | 2.2.2 | 2.2.3 | 2.3.0 | 2.3.1 | 2.3.2 | 2.3.3
8.1+ 2.3.4 | 2.3.5

服务安装

xhprof 安装

接入项目

用此段代码将入口文件包住

配置nginx访问分析文件

server {
        listen 80;
        server_name xhprof-test.com;
        root /data/server/xhprof/xhprof_html/;
        index index.html index.htm index.php;
        location / {
                if (!-e $request_filename) {
                        rewrite  ^(.*)$  /index.php?s=$1  last;
                        break;
                }
        }
        location ~ [^/]\.php(/|$) {
                index  index.html index.htm;
                fastcgi_pass 127.0.0.1:9000;
                include fastcgi_params;
                include fastcgi.conf;
        }
        location ~ /\.git {
                deny all;
        }
}

错误记录

php-fpm 错误日志

举报

相关推荐

0 条评论