laynefyc / php-monitor Goto Github PK
View Code? Open in Web Editor NEWA free, flexible, powerful tool that helps you monitor PHP Service and profiling PHP code.
A free, flexible, powerful tool that helps you monitor PHP Service and profiling PHP code.
php版本
PHP 7.3.1 (cli) (built: Feb 1 2019 12:26:46) ( NTS )
tideways版本
tideways => 4.1.7 Connection (tideways.connection) => unix:///var/run/tideways/tidewaysd.sock UDP Connection (tideways.udp_connection) => 127.0.0.1:8135 Default API Key (tideways.api_key) => Default Sample-Rate (tideways.sample_rate) => 20 Framework Detection (tideways.framework) => Service Name (tideways.service) => Automatically Start (tideways.auto_start) => Yes Tideways Collect Mode (tideways.collect) => tracing Tideways Monitoring Mode (tideways.monitor) => basic CLI Monitoring enabled (tideways.monitor_cli) => 0 Timeout for talk to Daemon (tideways.timeout) => 10000 Allowed Distributed Tracing Hosts (tideways.distributed_tracing_hosts) => 127.0.0.1 Load PHP Library (tideways.auto_prepend_library) => Yes Tideways.php found => No
在php.ini配置是可以的,但是全局起作用,希望在nginx对应项目配置,但是没数据产生,
希望大佬指点一下。
PHP 5.6.38 (cli) (built: Oct 15 2018 15:54:36)
doctrine/inflector v1.1.0 Common String Manipulations with regard to casing and singular/plural rules.
illuminate/container v5.4.36 The Illuminate Container package.
illuminate/contracts v5.4.36 The Illuminate Contracts package.
illuminate/database v5.4.36 The Illuminate Database package.
illuminate/events v5.4.36 The Illuminate Events package.
illuminate/pagination v5.4.36 The Illuminate Pagination package.
illuminate/support v5.4.36 The Illuminate Support package.
jenssegers/mongodb v2.3.5 A MongoDB based Eloquent model and Query builder for Laravel 4
kylekatarnls/update-helper 1.2.1 Update helper
nesbot/carbon 1.39.1 A simple API extension for DateTime.
paragonie/random_compat v2.0.20 PHP 5.x polyfill for random_bytes() and random_int() from PHP 7
symfony/polyfill-mbstring v1.19.0 Symfony polyfill for the Mbstring extension
symfony/translation v3.4.47 Symfony Translation Component
[12-Jan-2022 11:09:12 PRC] PHP Warning: Missing argument 2 for Illuminate\Database\Eloquent\Model::setAttribute(), called in /data/php-monitor/vendor/illuminate/database/Eloquent/Concerns/HasAttributes.php on line 519 and defined in /data/php-monitor/vendor/illuminate/database/Eloquent/Concerns/HasAttributes.php on line 511
[12-Jan-2022 11:09:12 PRC] PHP Notice: Undefined variable: value in /data/php-monitor/vendor/illuminate/database/Eloquent/Concerns/HasAttributes.php on line 519
pm\model\common\TraitModel
用save方法保存数据出错了
laravel 版本:6.0
mongo 版本:4.4.1
php: 7.3.9 | 7.4
建议
可能是天府三街最好用的PHP非侵入式监控平台
修改为
更好用的PHP非侵入式监控平台
如果一定想带地区
那就
可能是东半球最好用的PHP非侵入式监控平台
环境:php5.6 Composer version 1.10-dev
说明:
安装php-monitor时,composer.json修改php5.6的依赖版本,如下
"require": {
"php": "^5.6 || ^7.0",
"ext-json": "*",
"illuminate/database": "~5.2.0",
"jenssegers/mongodb": "~2.3.0",
"illuminate/pagination": "~5.2.0",
"kylekatarnls/laravel-carbon-2": "^1.0.0",
"nesbot/carbon": "2.16.3 as 1.34.0"
},
"suggest": {
"ext-xhprof": "You need to install either xhprof or uprofiler.",
"ext-uprofiler": "You need to install either xhprof or uprofiler.",
"ext-mongodb": "Mongo is needed to store profiler results.",
"ext-sqlite3": "sqlite3 is needed to store profiler results.",
"ext-pdo_mysql": "pdo_mysql is needed to store profiler results."
},
"autoload": {
"psr-4": {
"pm\": "src/"
}
},
"require-dev": {
"phpunit/phpunit": "~5.6.0"
用php5.6执行composer(系统中存在多个php)
php composer.phar --ignore-platform-reqs
数据库修改为mysql
访问php-monitor项目报错:信息如下:
2020/11/12 13:37:59 [error] 3392#0: *19274 FastCGI sent in stderr: "PHP message: PHP Parse error: syntax error, unexpected 'const' (T_CONST), expecting variable (T_VARIABLE) in /opt/test/monitor/php-monitor-1.0.1/vendor/nesbot/carbon/src/Carbon/CarbonInterface.php on line 501" while reading response header from upstream, client: XXX.XXX.XXX.XXX, server: XXX.XXX.XXX.XXX, request: "POST /?r=login/account HTTP/1.1", upstream: "fastcgi://unix:/tmp/php-cgi-56.sock:", host: "XXX.XXX.XXX.XXX", referrer: "http://XXX.XXX.XXX.XXX:XX/assets/"
使用tideways 展示出来的sql都是匿名的,值是以占位符显示的,该如何显示完整的SQL
刚开始是依赖版本的原因,在php5.6环境下会报错,后来更新了相应的依赖包到支持php5.6的版本,但是依然没法存储数据,通过调试发现 profile数据是已经拿到了,但是在save数据的时候没有成功,也没有任何错误抛出。
下面是我的依赖包的版本
"php": "^5.6",
"ext-json": "*",
"illuminate/database": "~5.3",
"illuminate/pagination": "~5.3"
安装的tideways5.2版本的
扩展名字已经换了
extension=tideways_xhprof.so
建议您出一个php5.+的安装文档
然后出一个php7.+的安装文档
tideways 支持workerman 这样的常驻内存的服务吗
使用方式为:
//加载php-monitor监控系统
require '/data/softdata/php-monitor/src/autoPrepend.php';
// 加载composer
require ROOT_PATH . '/composer/vendor/autoload.php';
访问项目:
<br />
<b>Notice</b>: Trying to get property 'application' of non-object in <b>/data/web/github/phalcondemo/app/bootstrap/services.php</b> on line <b>47</b><br />
<br />
<b>Notice</b>: Trying to get property 'viewsDir' of non-object in <b>/data/web/github/phalcondemo/app/bootstrap/services.php</b> on line <b>47</b><br />
<br />
<b>Fatal error</b>: Uncaught Phalcon\Mvc\View\Exception: Views directory must be a string or an array in phalcon/mvc/view.zep:179
Stack trace:
#0 /data/web/github/phalcondemo/app/bootstrap/services.php(47): Phalcon\Mvc\View->setViewsDir(NULL)
#1 [internal function]: Closure->{closure}()
#2 [internal function]: Phalcon\Di\Service->resolve(NULL, Object(Phalcon\Di\FactoryDefault))
#3 [internal function]: Phalcon\Di->get('view', NULL)
#4 /data/web/github/phalcondemo/app/Sdks/Library/Helpers/DiHelper.php(24): Phalcon\Di->getShared('view')
#5 /data/web/github/phalcondemo/app/Sdks/Core/System/Flash/CustomFlash.php(51): App\Sdks\Library\Helpers\DiHelper::getShared('view')
#6 /data/web/github/phalcondemo/app/Sdks/Core/System/Flash/CustomFlash.php(85): App\Sdks\Core\System\Flash\CustomFlash->outputJson(Object(stdClass), -1, '\nError Code: 50...')
#7 /data/web/github/phalcondemo/app/bootstrap/exception_handler.php(58): App\Sdks\Core\System\Flash\CustomFlash->errorJson(Array, -1, '\nError Code: 50...')
#8 [internal function]: {closure}(Obje in <b>phalcon/mvc/view.zep</b> on line <b>179</b><br />
<br />
<b>Fatal error</b>: Uncaught ArgumentCountError: Too few arguments to function Illuminate\Database\Eloquent\Model::setAttribute(), 1 passed in /data/web/github/phalcondemo/composer/vendor/illuminate/database/Illuminate/Database/Eloquent/Model.php on line 2476 and exactly 2 expected in /data/web/github/phalcondemo/composer/vendor/illuminate/database/Illuminate/Database/Eloquent/Model.php:2467
Stack trace:
#0 /data/web/github/phalcondemo/composer/vendor/illuminate/database/Illuminate/Database/Eloquent/Model.php(2476): Illuminate\Database\Eloquent\Model->setAttribute(Object(Carbon\Carbon))
#1 /data/web/github/phalcondemo/composer/vendor/illuminate/database/Illuminate/Database/Eloquent/Model.php(2912): Illuminate\Database\Eloquent\Model->setAttribute('', Object(Carbon\Carbon))
#2 /data/web/github/phalcondemo/composer/vendor/illuminate/database/Illuminate/Database/Eloquent/Model.php(1643): Illuminate\Database\Eloquent\Model->__set('', Object(Carbon\Carbon))
#3 /data/web/github/phalcondemo/composer/vendor/illuminate/database/Illuminat in <b>/data/web/github/phalcondemo/composer/vendor/illuminate/database/Illuminate/Database/Eloquent/Model.php</b> on line <b>2467</b><br />
php7.4
tideways_xhprof latest
the sql always empty
第一个问题
扩展名字 最新的叫 tideways_xhprof.so
我修改了config.php
//'extension' => 'tideways',
'extension' => 'tideways_xhprof',
然后提示
Fatal error: Uncaught ArgumentCountError: Too few arguments to function
Illuminate\Database\Eloquent\Model::setAttribute(), 1 passed in
/data/web/easyphalcon/composer/vendor/illuminate/database/Illuminate/Database/Eloquent/Model.php on line 2476 and exactly 2 expected in
/data/web/easyphalcon/composer/vendor/illuminate/database/Illuminate/Database/Eloquent/Model.php:2467 Stack trace: #0 /data/web/easyphalcon/composer/vendor/illuminate/database/Illuminate/Database/Eloquent/Model.php(2476): Illuminate\Database\Eloquent\Model->setAttribute(Object(Carbon\Carbon)) #1
/data/web/easyphalcon/composer/vendor/illuminate/database/Illuminate/Database/Eloquent/Model.php(2912): Illuminate\Database\Eloquent\Model->setAttribute('', Object(Carbon\Carbon)) #2
/data/web/easyphalcon/composer/vendor/illuminate/database/Illuminate/Database/Eloquent/Model.php(1643): Illuminate\Database\Eloquent\Model->__set('', Object(Carbon\Carbon)) #3 /data/web/easyphalcon/composer/vendor/illuminate/database/Illuminate/Database/Eloquent/Model.php(1615): Illum in /data/web/easyphalcon/composer/vendor/illuminate/database/Illuminate/Database/Eloquent/Model.php on line 2467
[500]: /?r=login/account - Declaration of Illuminate\Container\Container::get($id) must be compatible with Psr\Container\ContainerInterface::get(string $id) in /usr/local/src/php-monitor/vendor/illuminate/container/Container.php on line 15
适配 ThinkPHP 不正常 显示 Class 'Dotenv\Environment\DotenvFactory' not found
用户得到授权,但是访问是被禁止的。
RT
RT
A declarative, efficient, and flexible JavaScript library for building user interfaces.
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
An Open Source Machine Learning Framework for Everyone
The Web framework for perfectionists with deadlines.
A PHP framework for web artisans
Bring data to life with SVG, Canvas and HTML. 📊📈🎉
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
Some thing interesting about web. New door for the world.
A server is a program made to process requests and deliver data to clients.
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
Some thing interesting about visualization, use data art
Some thing interesting about game, make everyone happy.
We are working to build community through open source technology. NB: members must have two-factor auth.
Open source projects and samples from Microsoft.
Google ❤️ Open Source for everyone.
Alibaba Open Source for everyone
Data-Driven Documents codes.
China tencent open source team.