Add more php ini configuration options to make frankenphp behave like standard php-fpm
This commit is contained in:
@@ -224,14 +224,18 @@ return (function () {
|
||||
'disable_functions' => null,
|
||||
'display_errors' => 0,
|
||||
'error_log' => $inContainer ? '/proc/self/fd/2' : 'syslog',
|
||||
'syslog.ident' => 'php-fpm',
|
||||
'syslog.ident' => $inContainer ? 'frankenphp' : 'php-fpm',
|
||||
'memory_limit' => '265M',
|
||||
'post_max_size' => '100M',
|
||||
'upload_max_filesize' => '100M',
|
||||
'zend.exception_ignore_args' => $inContainer ? 1 : 0,
|
||||
'pcre.jit' => 1,
|
||||
'opcache.enable' => 1,
|
||||
'opcache.memory_consumption' => 128,
|
||||
'opcache.interned_strings_buffer' => 8,
|
||||
'opcache.max_accelerated_files' => 10000,
|
||||
'opcache.max_wasted_percentage' => 5,
|
||||
'opcache.validate_timestamps' => $inContainer ? 0 : 1,
|
||||
'expose_php' => 0,
|
||||
'date.timezone' => ag($config, 'tz', 'UTC'),
|
||||
'zend.assertions' => -1
|
||||
|
||||
@@ -7,15 +7,24 @@ namespace App\API\System;
|
||||
use App\Libs\Attributes\Route\Get;
|
||||
use App\Libs\Enums\Http\Status;
|
||||
use Psr\Http\Message\ResponseInterface as iResponse;
|
||||
use Psr\Http\Message\ServerRequestInterface as iRequest;
|
||||
|
||||
final class Report
|
||||
{
|
||||
public const string URL = '%{api.prefix}/system/report';
|
||||
|
||||
#[Get(self::URL . '[/]', name: 'system.report')]
|
||||
public function __invoke(iRequest $request): iResponse
|
||||
public function basic_report(): iResponse
|
||||
{
|
||||
return api_response(Status::OK, runCommand('system:report', asArray: true));
|
||||
}
|
||||
|
||||
#[Get(self::URL . '/ini[/]', name: 'system.ini')]
|
||||
public function php_ini(): iResponse
|
||||
{
|
||||
if (false === str_starts_with(getAppVersion(), 'dev')) {
|
||||
return api_error('This endpoint is only available in development mode.', Status::FORBIDDEN);
|
||||
}
|
||||
|
||||
return api_response(Status::OK, ['content' => ini_get_all()]);
|
||||
}
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user