wyx2685 / v2board

🚀A multiple proxy protocol manage panel application interface
MIT License
615 stars 187 forks source link

[BUG]webman模式下修改设置500错误 #141

Open MeTerminator opened 2 weeks ago

MeTerminator commented 2 weeks ago

使用aapanel面板,正常模式下无错误,仿照XBoard的webman配置,在管理后台进行系统设置保存时出现500错误 以下是报错

{"exception":{"\u0000\u0000message":"Undefined array key \"PHP_SELF\"","\u0000Exception\u0000string":"","\u0000\u0000code":0,"\u0000\u0000file":"\/www\/wwwroot\/v2board\/vendor\/symfony\/console\/Command\/DumpCompletionCommand.php","\u0000\u0000line":42,"\u0000Exception\u0000trace":[{"file":"\/www\/wwwroot\/v2board\/vendor\/symfony\/console\/Command\/DumpCompletionCommand.php","line":42,"function":"handleError","class":"Illuminate\Foundation\Bootstrap\HandleExceptions","type":"->"},{"file":"\/www\/wwwroot\/v2board\/vendor\/symfony\/console\/Command\/Command.php","line":122,"function":"configure","class":"Symfony\Component\Console\Command\DumpCompletionCommand","type":"->"},{"file":"\/www\/wwwroot\/v2board\/vendor\/symfony\/console\/Application.php","line":1117,"function":"construct","class":"Symfony\Component\Console\Command\Command","type":"->"},{"file":"\/www\/wwwroot\/v2board\/vendor\/symfony\/console\/Application.php","line":1297,"function":"getDefaultCommands","class":"Symfony\Component\Console\Application","type":"->"},{"file":"\/www\/wwwroot\/v2board\/vendor\/symfony\/console\/Application.php","line":525,"function":"init","class":"Symfony\Component\Console\Application","type":"->"},{"file":"\/www\/wwwroot\/v2board\/vendor\/laravel\/framework\/src\/Illuminate\/Console\/Application.php","line":251,"function":"add","class":"Symfony\Component\Console\Application","type":"->"},{"file":"\/www\/wwwroot\/v2board\/vendor\/laravel\/framework\/src\/Illuminate\/Console\/Application.php","line":240,"function":"addToParent","class":"Illuminate\Console\Application","type":"->"},{"file":"\/www\/wwwroot\/v2board\/vendor\/laravel\/framework\/src\/Illuminate\/Console\/Application.php","line":262,"function":"add","class":"Illuminate\Console\Application","type":"->"},{"file":"\/www\/wwwroot\/v2board\/vendor\/laravel\/framework\/src\/Illuminate\/Console\/Application.php","line":276,"function":"resolve","class":"Illuminate\Console\Application","type":"->"},{"file":"\/www\/wwwroot\/v2board\/vendor\/laravel\/framework\/src\/Illuminate\/Support\/ServiceProvider.php","line":404,"function":"resolveCommands","class":"Illuminate\Console\Application","type":"->"},{"file":"\/www\/wwwroot\/v2board\/vendor\/laravel\/framework\/src\/Illuminate\/Console\/Application.php","line":153,"function":"Illuminate\Support\{closure}","class":"Illuminate\Support\ServiceProvider","type":"->"},{"file":"\/www\/wwwroot\/v2board\/vendor\/laravel\/framework\/src\/Illuminate\/Console\/Application.php","line":74,"function":"bootstrap","class":"Illuminate\Console\Application","type":"->"},{"file":"\/www\/wwwroot\/v2board\/vendor\/laravel\/framework\/src\/Illuminate\/Foundation\/Console\/Kernel.php","line":330,"function":"construct","class":"Illuminate\Console\Application","type":"->"},{"file":"\/www\/wwwroot\/v2board\/vendor\/laravel\/framework\/src\/Illuminate\/Foundation\/Console\/Kernel.php","line":263,"function":"getArtisan","class":"Illuminate\Foundation\Console\Kernel","type":"->"},{"file":"\/www\/wwwroot\/v2board\/vendor\/laravel\/framework\/src\/Illuminate\/Support\/Facades\/Facade.php","line":261,"function":"call","class":"Illuminate\Foundation\Console\Kernel","type":"->"},{"file":"\/www\/wwwroot\/v2board\/app\/Http\/Controllers\/V1\/Admin\/ConfigController.php","line":200,"function":"__callStatic","class":"Illuminate\Support\Facades\Facade","type":"::"},{"file":"\/www\/wwwroot\/v2board\/vendor\/laravel\/framework\/src\/Illuminate\/Routing\/Controller.php","line":54,"function":"save","class":"App\Http\Controllers\V1\Admin\ConfigController","type":"->"},{"file":"\/www\/wwwroot\/v2board\/vendor\/laravel\/framework\/src\/Illuminate\/Routing\/ControllerDispatcher.php","line":45,"function":"callAction","class":"Illuminate\Routing\Controller","type":"->"},{"file":"\/www\/wwwroot\/v2board\/vendor\/laravel\/framework\/src\/Illuminate\/Routing\/Route.php","line":262,"function":"dispatch","class":"Illuminate\Routing\ControllerDispatcher","type":"->"},{"file":"\/www\/wwwroot\/v2board\/vendor\/laravel\/framework\/src\/Illuminate\/Routing\/Route.php","line":205,"function":"runController","class":"Illuminate\Routing\Route","type":"->"},{"file":"\/www\/wwwroot\/v2board\/vendor\/laravel\/framework\/src\/Illuminate\/Routing\/Router.php","line":721,"function":"run","class":"Illuminate\Routing\Route","type":"->"},{"file":"\/www\/wwwroot\/v2board\/vendor\/laravel\/framework\/src\/Illuminate\/Pipeline\/Pipeline.php","line":128,"function":"Illuminate\Routing\{closure}","class":"Illuminate\Routing\Router","type":"->"},{"file":"\/www\/wwwroot\/v2board\/app\/Http\/Middleware\/RequestLog.php","line":22,"function":"Illuminate\Pipeline\{closure}","class":"Illuminate\Pipeline\Pipeline","type":"->"},{"file":"\/www\/wwwroot\/v2board\/vendor\/laravel\/framework\/src\/Illuminate\/Pipeline\/Pipeline.php","line":167,"function":"handle","class":"App\Http\Middleware\RequestLog","type":"->"},{"file":"\/www\/wwwroot\/v2board\/app\/Http\/Middleware\/Admin.php","line":28,"function":"Illuminate\Pipeline\{closure}","class":"Illuminate\Pipeline\Pipeline","type":"->"},{"file":"\/www\/wwwroot\/v2board\/vendor\/laravel\/framework\/src\/Illuminate\/Pipeline\/Pipeline.php","line":167,"function":"handle","class":"App\Http\Middleware\Admin","type":"->"},{"file":"\/www\/wwwroot\/v2board\/vendor\/laravel\/framework\/src\/Illuminate\/Routing\/Middleware\/SubstituteBindings.php","line":50,"function":"Illuminate\Pipeline\{closure}","class":"Illuminate\Pipeline\Pipeline","type":"->"},{"file":"\/www\/wwwroot\/v2board\/vendor\/laravel\/framework\/src\/Illuminate\/Pipeline\/Pipeline.php","line":167,"function":"handle","class":"Illuminate\Routing\Middleware\SubstituteBindings","type":"->"},{"file":"\/www\/wwwroot\/v2board\/app\/Http\/Middleware\/Language.php","line":15,"function":"Illuminate\Pipeline\{closure}","class":"Illuminate\Pipeline\Pipeline","type":"->"},{"file":"\/www\/wwwroot\/v2board\/vendor\/laravel\/framework\/src\/Illuminate\/Pipeline\/Pipeline.php","line":167,"function":"handle","class":"App\Http\Middleware\Language","type":"->"},{"file":"\/www\/wwwroot\/v2board\/app\/Http\/Middleware\/ForceJson.php","line":20,"function":"Illuminate\Pipeline\{closure}","class":"Illuminate\Pipeline\Pipeline","type":"->"},{"file":"\/www\/wwwroot\/v2board\/vendor\/laravel\/framework\/src\/Illuminate\/Pipeline\/Pipeline.php","line":167,"function":"handle","class":"App\Http\Middleware\ForceJson","type":"->"},{"file":"\/www\/wwwroot\/v2board\/vendor\/laravel\/framework\/src\/Illuminate\/Pipeline\/Pipeline.php","line":103,"function":"Illuminate\Pipeline\{closure}","class":"Illuminate\Pipeline\Pipeline","type":"->"},{"file":"\/www\/wwwroot\/v2board\/vendor\/laravel\/framework\/src\/Illuminate\/Routing\/Router.php","line":723,"function":"then","class":"Illuminate\Pipeline\Pipeline","type":"->"},{"file":"\/www\/wwwroot\/v2board\/vendor\/laravel\/framework\/src\/Illuminate\/Routing\/Router.php","line":698,"function":"runRouteWithinStack","class":"Illuminate\Routing\Router","type":"->"},{"file":"\/www\/wwwroot\/v2board\/vendor\/laravel\/framework\/src\/Illuminate\/Routing\/Router.php","line":662,"function":"runRoute","class":"Illuminate\Routing\Router","type":"->"},{"file":"\/www\/wwwroot\/v2board\/vendor\/laravel\/framework\/src\/Illuminate\/Routing\/Router.php","line":651,"function":"dispatchToRoute","class":"Illuminate\Routing\Router","type":"->"},{"file":"\/www\/wwwroot\/v2board\/vendor\/laravel\/framework\/src\/Illuminate\/Foundation\/Http\/Kernel.php","line":167,"function":"dispatch","class":"Illuminate\Routing\Router","type":"->"},{"file":"\/www\/wwwroot\/v2board\/vendor\/laravel\/framework\/src\/Illuminate\/Pipeline\/Pipeline.php","line":128,"function":"Illuminate\Foundation\Http\{closure}","class":"Illuminate\Foundation\Http\Kernel","type":"->"},{"file":"\/www\/wwwroot\/v2board\/vendor\/laravel\/framework\/src\/Illuminate\/Foundation\/Http\/Middleware\/TransformsRequest.php","line":21,"function":"Illuminate\Pipeline\{closure}","class":"Illuminate\Pipeline\Pipeline","type":"->"},{"file":"\/www\/wwwroot\/v2board\/vendor\/laravel\/framework\/src\/Illuminate\/Foundation\/Http\/Middleware\/ConvertEmptyStringsToNull.php","line":31,"function":"handle","class":"Illuminate\Foundation\Http\Middleware\TransformsRequest","type":"->"},{"file":"\/www\/wwwroot\/v2board\/vendor\/laravel\/framework\/src\/Illuminate\/Pipeline\/Pipeline.php","line":167,"function":"handle","class":"Illuminate\Foundation\Http\Middleware\ConvertEmptyStringsToNull","type":"->"},{"file":"\/www\/wwwroot\/v2board\/vendor\/laravel\/framework\/src\/Illuminate\/Foundation\/Http\/Middleware\/TransformsRequest.php","line":21,"function":"Illuminate\Pipeline\{closure}","class":"Illuminate\Pipeline\Pipeline","type":"->"},{"file":"\/www\/wwwroot\/v2board\/vendor\/laravel\/framework\/src\/Illuminate\/Foundation\/Http\/Middleware\/TrimStrings.php","line":40,"function":"handle","class":"Illuminate\Foundation\Http\Middleware\TransformsRequest","type":"->"},{"file":"\/www\/wwwroot\/v2board\/vendor\/laravel\/framework\/src\/Illuminate\/Pipeline\/Pipeline.php","line":167,"function":"handle","class":"Illuminate\Foundation\Http\Middleware\TrimStrings","type":"->"},{"file":"\/www\/wwwroot\/v2board\/vendor\/laravel\/framework\/src\/Illuminate\/Foundation\/Http\/Middleware\/ValidatePostSize.php","line":27,"function":"Illuminate\Pipeline\{closure}","class":"Illuminate\Pipeline\Pipeline","type":"->"},{"file":"\/www\/wwwroot\/v2board\/vendor\/laravel\/framework\/src\/Illuminate\/Pipeline\/Pipeline.php","line":167,"function":"handle","class":"Illuminate\Foundation\Http\Middleware\ValidatePostSize","type":"->"},{"file":"\/www\/wwwroot\/v2board\/vendor\/laravel\/framework\/src\/Illuminate\/Foundation\/Http\/Middleware\/PreventRequestsDuringMaintenance.php","line":86,"function":"Illuminate\Pipeline\{closure}","class":"Illuminate\Pipeline\Pipeline","type":"->"},{"file":"\/www\/wwwroot\/v2board\/vendor\/laravel\/framework\/src\/Illuminate\/Pipeline\/Pipeline.php","line":167,"function":"handle","class":"Illuminate\Foundation\Http\Middleware\PreventRequestsDuringMaintenance","type":"->"},{"file":"\/www\/wwwroot\/v2board\/vendor\/fideloper\/proxy\/src\/TrustProxies.php","line":57,"function":"Illuminate\Pipeline\{closure}","class":"Illuminate\Pipeline\Pipeline","type":"->"},{"file":"\/www\/wwwroot\/v2board\/vendor\/laravel\/framework\/src\/Illuminate\/Pipeline\/Pipeline.php","line":167,"function":"handle","class":"Fideloper\Proxy\TrustProxies","type":"->"},{"file":"\/www\/wwwroot\/v2board\/app\/Http\/Middleware\/UAfilter.php","line":47,"function":"Illuminate\Pipeline\{closure}","class":"Illuminate\Pipeline\Pipeline","type":"->"},{"file":"\/www\/wwwroot\/v2board\/vendor\/laravel\/framework\/src\/Illuminate\/Pipeline\/Pipeline.php","line":167,"function":"handle","class":"App\Http\Middleware\UAfilter","type":"->"},{"file":"\/www\/wwwroot\/v2board\/app\/Http\/Middleware\/CORS.php","line":18,"function":"Illuminate\Pipeline\{closure}","class":"Illuminate\Pipeline\Pipeline","type":"->"},{"file":"\/www\/wwwroot\/v2board\/vendor\/laravel\/framework\/src\/Illuminate\/Pipeline\/Pipeline.php","line":167,"function":"handle","class":"App\Http\Middleware\CORS","type":"->"},{"file":"\/www\/wwwroot\/v2board\/vendor\/laravel\/framework\/src\/Illuminate\/Pipeline\/Pipeline.php","line":103,"function":"Illuminate\Pipeline\{closure}","class":"Illuminate\Pipeline\Pipeline","type":"->"},{"file":"\/www\/wwwroot\/v2board\/vendor\/laravel\/framework\/src\/Illuminate\/Foundation\/Http\/Kernel.php","line":142,"function":"then","class":"Illuminate\Pipeline\Pipeline","type":"->"},{"file":"\/www\/wwwroot\/v2board\/vendor\/laravel\/framework\/src\/Illuminate\/Foundation\/Http\/Kernel.php","line":111,"function":"sendRequestThroughRouter","class":"Illuminate\Foundation\Http\Kernel","type":"->"},{"file":"\/www\/wwwroot\/v2board\/start.php","line":63,"function":"handle","class":"Illuminate\Foundation\Http\Kernel","type":"->"},{"file":"\/www\/wwwroot\/v2board\/webman.php","line":32,"function":"run"},{"file":"\/www\/wwwroot\/v2board\/vendor\/workerman\/workerman\/Connection\/TcpConnection.php","line":646,"function":"{closure}"},{"function":"baseRead","class":"Workerman\Connection\TcpConnection","type":"->"},{"file":"\/www\/wwwroot\/v2board\/vendor\/workerman\/workerman\/Events\/Event.php","line":193,"function":"loop","class":"EventBase","type":"->"},{"file":"\/www\/wwwroot\/v2board\/vendor\/workerman\/workerman\/Worker.php","line":1638,"function":"loop","class":"Workerman\Events\Event","type":"->"},{"file":"\/www\/wwwroot\/v2board\/vendor\/workerman\/workerman\/Worker.php","line":1429,"function":"forkOneWorkerForLinux","class":"Workerman\Worker","type":"::"},{"file":"\/www\/wwwroot\/v2board\/vendor\/workerman\/workerman\/Worker.php","line":1403,"function":"forkWorkersForLinux","class":"Workerman\Worker","type":"::"},{"file":"\/www\/wwwroot\/v2board\/vendor\/workerman\/workerman\/Worker.php","line":560,"function":"forkWorkers","class":"Workerman\Worker","type":"::"},{"file":"\/www\/wwwroot\/v2board\/webman.php","line":38,"function":"runAll","class":"Workerman\Worker","type":"::"}],"\u0000Exception\u0000previous":null,"\u0000*\u0000severity":2}}

自己的修复方式: 修改/www/wwwroot/v2board/vendor/symfony/console/Command/DumpCompletionCommand.php 第42行为

$fullCommand = isset($_SERVER['PHP_SELF']) ? $_SERVER['PHP_SELF'] : '';
wyx2685 commented 1 week ago

webman要配置nginx绕过config页 这边没有像xboard那样把配置放进数据库