PHPackages                             ethreads/xhgui-chinese - PHPackages - PHPackages  [Skip to content](#main-content)[PHPackages](/)[Directory](/)[Categories](/categories)[Trending](/trending)[Leaderboard](/leaderboard)[Changelog](/changelog)[Analyze](/analyze)[Collections](/collections)[Log in](/login)[Sign up](/register)

1. [Directory](/)
2. /
3. [Debugging &amp; Profiling](/categories/debugging)
4. /
5. ethreads/xhgui-chinese

ActiveLibrary[Debugging &amp; Profiling](/categories/debugging)

ethreads/xhgui-chinese
======================

From perftools/xhgui,A web based interface for viewing profile data collected by XHProf.

v1.0.6(5y ago)0280MITJavaScriptPHP &gt;=5.3.0

Since Jul 10Pushed 5y agoCompare

[ Source](https://github.com/ethreads/xhgui-branch)[ Packagist](https://packagist.org/packages/ethreads/xhgui-chinese)[ RSS](/packages/ethreads-xhgui-chinese/feed)WikiDiscussions master Synced 1mo ago

READMEChangelogDependencies (6)Versions (13)Used By (0)

最新
--

[](#最新)

新版本已开发完成，做了如下改进：

🌈 支持本地Sqlite存储，也支持MySQL和MongoDB存储。

🌍 国际化，支持英语/简体中文/繁体中文。

🛡 可通过Composer极速安装。

🎨 一句命令运行监控服务。

🌈 支持帐号密码登录。

更多新功能欢迎前往  体验。

历史
--

[](#历史)

新版本已经在开发中，后端功能全部开发完成，前端页面开发还在努力中。由于前端技术更新太快，不打算jQuery一把梭了，新版本会用上vue或者react，所以我也是边学习边开发。

公众号写了有一段时间，里面的内容也充实了不少，相比博客质量更高一些，分享的内容更成体系，有兴趣的关注看看。

提交Issue之前请看看 README.md(当前页面)和历史已经处理的 [Closed Issue](https://github.com/laynefyc/xhgui-branch/issues?q=is%3Aissue+is%3Aclosed)90%的问题都能找到答案。另外10%的问题请按照Issue模板中需要的信息提交，你提供的信息越多我越能给你准确的建议，不按照规范提交的Issue我会直接关闭。

2019年想定个目标 - 重写xhprof扩展和xhgui-branch，有兴趣的朋友请移步到我的博客留言交流一下 [我的博客](http://blog.it2048.cn/)

获取底层信息的PHP扩展很多，比如 uprofiler,tideways\_xhprof,tideways,xhprof等，他们的原理都一样，只是兼容性与稳定性的差别（选择一个安装，安装多个会冲突）。

```
Class 'MongoClient' not found
Fatal error: Call to undefined function xhprof_enable()

```

如出现上面的报错信息，请使用`php -m` 看看是否有tideways或者tideways\_xhprof扩展。 再修改 [config/config.default.php#L12](https://github.com/laynefyc/xhgui-branch/blob/ad6e0c0a3eaf9b5b0438cd4a3d3db937f1954058/config/config.default.php#L12) 配置文件的扩展名。 如果还有问题请检查vendor 目录下是否存在 alcaeus/mongo-php-adapter扩展文件（这是一个兼容mongo.so和mongodb.so的适配器）。如果不存在请更新代码（git pull origin master），然后运行composer install安装。

90%的问题都能在 **ISSUE** 中找到答案 [ISSUE](https://github.com/laynefyc/xhgui-branch/issues?q=is%3Aissue+is%3Aclosed)

tideways的新版扩展已经更名，并且不支持SQL显示，建议使用支持SQL展示的V4版本 [v4.1.6](https://github.com/tideways/php-xhprof-extension/tree/v4.1.6)

如果一定要使用V5版本，请修改配置文件 [config/config.default.php#L12](https://github.com/laynefyc/xhgui-branch/blob/ad6e0c0a3eaf9b5b0438cd4a3d3db937f1954058/config/config.default.php#L12) 为 tideways\_xhprof

已添加SQL列表与SQL执行时间展示（暂时只支持tideways扩展），下文有截图。

xhgui汉化与更新
----------

[](#xhgui汉化与更新)

xhgui的安装信息可到源项目查看文档：[xhgui](https://github.com/perftools/xhgui)

如果不能安装成功可到我博客看这篇文章：[Tideways和xhgui打造PHP非侵入式监控平台](http://blog.it2048.cn/article_tideways-xhgui.html)

当然最好的方式就是联系我,我的博客：

[![Latest Stable Version](https://camo.githubusercontent.com/842b18ca0ed9bf5392f29bb1be11521a11d69a4caf96fd75e39e44993d6db8b3/68747470733a2f2f706f7365722e707567782e6f72672f6c61796e656679632f78686775692d6368696e6573652f762f737461626c652e706e67)](https://packagist.org/packages/laynefyc/xhgui-chinese)[![Total Downloads](https://camo.githubusercontent.com/26bcbc4f8bd895a87ec0813d1427cdae5f2eaf4dec230dd95c4017c85ec24ba0/68747470733a2f2f706f7365722e707567782e6f72672f6c61796e656679632f78686775692d6368696e6573652f646f776e6c6f6164732e706e67)](https://packagist.org/packages/laynefyc/xhgui-chinese)[![Build Status](https://camo.githubusercontent.com/31ec08c57d9ab302080f6b32d9af35f8097917bf8e06520598507f6053e1c5b2/68747470733a2f2f7472617669732d63692e6f72672f6c61796e656679632f78686775692d6272616e63682e7376673f6272616e63683d6d6173746572)](https://travis-ci.org/laynefyc/xhgui-branch)

### 一. 站在举人的肩膀上

[](#一-站在举人的肩膀上)

项目的汉化参考了 ，对部分翻译不够准确的词做了修改，对未翻译的部分做了翻译。

xhgui源项目已经很久不更新了。我在基于xhgui搭建PHP监控平台的过程中遇到很多问题，自己对PHP和前端都还算了解，打算边修边优化并将更新的代码开源。

### 二. 为什么不直接在源项目提交Merge Request？

[](#二-为什么不直接在源项目提交merge-request)

我会将一些基本的语法Bug修复后提交Merge Request。但汉化的修改不会提，主要原因是xhgui源项目对代码的要求基本是可用就可的程度，后期扩展的添加混乱的一塌糊涂。维护代码的人也焦头烂额，很多显而易见的错误都没人修。我无法保证我提的代码被及时的采纳。xhgui的UI主要是针对老外设计的，很多符号和数据单位我看着不习惯，一些交互也不友好，这个项目主要会对这方面做改动所以不适合提交Merge Request。

### 三. 界面截图

[](#三-界面截图)

首页截图 [![首页截图](https://github.com/laynefyc/xhgui-branch/raw/screenshot/screenshot/homepage.png)](https://github.com/laynefyc/xhgui-branch/raw/screenshot/screenshot/homepage.png)

瀑布图 [![瀑布图](https://github.com/laynefyc/xhgui-branch/raw/screenshot/screenshot/waterfall.png)](https://github.com/laynefyc/xhgui-branch/raw/screenshot/screenshot/waterfall.png)

函数监控图 [![函数监控图](https://github.com/laynefyc/xhgui-branch/raw/screenshot/screenshot/view-function.png)](https://github.com/laynefyc/xhgui-branch/raw/screenshot/screenshot/view-function.png)

SQL列表 [![SQL列表](https://github.com/laynefyc/xhgui-branch/raw/screenshot/screenshot/sql_list.png)](https://github.com/laynefyc/xhgui-branch/raw/screenshot/screenshot/sql_list.png)

### 四. 更新日志

[](#四-更新日志)

1. 将时间选择控件换成了更符合国人使用习惯的laydate;
2. 将时间的格式转换成了 2017-06-08 12:18:18 格式；
3. 将微妙转换成了毫秒，byte转换成了MB或者KB；
4. 添加了IP的展示；
5. 将中文URL做了url\_decode();
6. 将页面的大标题去掉，换成用颜色选中的Nav标签展示；
7. 修复了『自定义函数』功能无法使用的问题；
8. 翻译了大量英文描述；
9. 很多小Tips等待有心人去发现；
10. 支持composer更新；

### 五. TODO

[](#五-todo)

1. 将前端展示页面抽离出来；
2. 支持多域名的显示；

### 六. 通过Composer安装&amp;更新

[](#六-通过composer安装更新)

```
composer require laynefyc/xhgui-chinese
```

### 七. 常见问题

[](#七-常见问题)

1. 如果数据显示不全，内存和执行等信息都是空，请排查PHP扩展程序，tideways和xhprof并不支持所有操作系统和所有PHP版本；
2. 如果mongoDB中的数据是空，请检查mongoDB的配置，header.php文件的引入是否规范；
3. 提交Issues请带上操作系统，PHP版本，扩展名和扩展版本。只提供一句话很难给你建议；
4. 历史问题在这里 [https://github.com/laynefyc/xhgui-branch/issues?utf8=%E2%9C%93&amp;q=is%3Aissue](https://github.com/laynefyc/xhgui-branch/issues?utf8=%E2%9C%93&q=is%3Aissue)

八. 既然看到这了不如加个微信吧
----------------

[](#八-既然看到这了不如加个微信吧)

[![https://github.com/laynefyc/xhgui-branch/blob/screenshot/screenshot/code-log1.png](https://github.com/laynefyc/xhgui-branch/raw/screenshot/screenshot/code-log1.png)](https://github.com/laynefyc/xhgui-branch/blob/screenshot/screenshot/code-log1.png)

###  Health Score

31

—

LowBetter than 68% of packages

Maintenance20

Infrequent updates — may be unmaintained

Popularity11

Limited adoption so far

Community19

Small or concentrated contributor base

Maturity65

Established project with proven stability

 Bus Factor1

Top contributor holds 78.3% of commits — single point of failure

How is this calculated?**Maintenance (25%)** — Last commit recency, latest release date, and issue-to-star ratio. Uses a 2-year decay window.

**Popularity (30%)** — Total and monthly downloads, GitHub stars, and forks. Logarithmic scaling prevents top-heavy scores.

**Community (15%)** — Contributors, dependents, forks, watchers, and maintainers. Measures real ecosystem engagement.

**Maturity (30%)** — Project age, version count, PHP version support, and release stability.

###  Release Activity

Cadence

Every ~171 days

Recently: every ~222 days

Total

8

Last Release

2029d ago

### Community

Maintainers

![](https://www.gravatar.com/avatar/3d5f2c57ef13b31686a650e86c3ac2b93b798bde559ad732928aa40d62ef5d6c?d=identicon)[ethreads](/maintainers/ethreads)

---

Top Contributors

[![markstory](https://avatars.githubusercontent.com/u/24086?v=4)](https://github.com/markstory "markstory (613 commits)")[![preinheimer](https://avatars.githubusercontent.com/u/244891?v=4)](https://github.com/preinheimer "preinheimer (58 commits)")[![laynefyc](https://avatars.githubusercontent.com/u/20231054?v=4)](https://github.com/laynefyc "laynefyc (50 commits)")[![bertrandmalet](https://avatars.githubusercontent.com/u/496453?v=4)](https://github.com/bertrandmalet "bertrandmalet (12 commits)")[![sebbrandt87](https://avatars.githubusercontent.com/u/793580?v=4)](https://github.com/sebbrandt87 "sebbrandt87 (7 commits)")[![thbourlove](https://avatars.githubusercontent.com/u/1768066?v=4)](https://github.com/thbourlove "thbourlove (5 commits)")[![lornajane](https://avatars.githubusercontent.com/u/172607?v=4)](https://github.com/lornajane "lornajane (4 commits)")[![dshafik](https://avatars.githubusercontent.com/u/58074?v=4)](https://github.com/dshafik "dshafik (3 commits)")[![david-garcia-garcia](https://avatars.githubusercontent.com/u/9599352?v=4)](https://github.com/david-garcia-garcia "david-garcia-garcia (3 commits)")[![anho](https://avatars.githubusercontent.com/u/863612?v=4)](https://github.com/anho "anho (3 commits)")[![liuquanhao](https://avatars.githubusercontent.com/u/7736182?v=4)](https://github.com/liuquanhao "liuquanhao (2 commits)")[![beberlei](https://avatars.githubusercontent.com/u/26936?v=4)](https://github.com/beberlei "beberlei (2 commits)")[![kornrunner](https://avatars.githubusercontent.com/u/725986?v=4)](https://github.com/kornrunner "kornrunner (2 commits)")[![sylus](https://avatars.githubusercontent.com/u/984304?v=4)](https://github.com/sylus "sylus (2 commits)")[![tkaven](https://avatars.githubusercontent.com/u/4628730?v=4)](https://github.com/tkaven "tkaven (2 commits)")[![kdambekalns](https://avatars.githubusercontent.com/u/95873?v=4)](https://github.com/kdambekalns "kdambekalns (1 commits)")[![joshuataylor](https://avatars.githubusercontent.com/u/225131?v=4)](https://github.com/joshuataylor "joshuataylor (1 commits)")[![jdeniau](https://avatars.githubusercontent.com/u/1398469?v=4)](https://github.com/jdeniau "jdeniau (1 commits)")[![mdnoga](https://avatars.githubusercontent.com/u/6842166?v=4)](https://github.com/mdnoga "mdnoga (1 commits)")[![mre](https://avatars.githubusercontent.com/u/175809?v=4)](https://github.com/mre "mre (1 commits)")

###  Code Quality

TestsPHPUnit

### Embed Badge

![Health badge](/badges/ethreads-xhgui-chinese/health.svg)

```
[![Health](https://phpackages.com/badges/ethreads-xhgui-chinese/health.svg)](https://phpackages.com/packages/ethreads-xhgui-chinese)
```

###  Alternatives

[rarst/laps

Light WordPress profiler.

567262.1k2](/packages/rarst-laps)[laynefyc/xhgui-chinese

From perftools/xhgui,A web based interface for viewing profile data collected by XHProf.

8931.9k](/packages/laynefyc-xhgui-chinese)[rarst/wps

WordPress plugin for whoops error handler.

129133.2k3](/packages/rarst-wps)[oat-sa/tao-core

TAO core extension

66136.7k74](/packages/oat-sa-tao-core)[matthimatiker/opcache-bundle

Displays the state of the PHP opcache in the Symfony profiler toolbar.

2288.2k](/packages/matthimatiker-opcache-bundle)[yusukezzz/slim-debugbar

4213.5k](/packages/yusukezzz-slim-debugbar)

PHPackages © 2026

[Directory](/)[Categories](/categories)[Trending](/trending)[Changelog](/changelog)[Analyze](/analyze)
