环境: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/"
环境: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/"