Linux vps-61133.fhnet.fr 4.9.0-19-amd64 #1 SMP Debian 4.9.320-2 (2022-06-30) x86_64
Apache/2.4.25 (Debian)
Server IP : 93.113.207.21 & Your IP : 216.73.216.112
Domains :
Cant Read [ /etc/named.conf ]
User : www-data
Terminal
Auto Root
Create File
Create Folder
Localroot Suggester
Backdoor Destroyer
Readme
/
usr /
src /
php-7.4.33 /
sapi /
fpm /
tests /
Delete
Unzip
Name
Size
Permission
Date
Action
CONFLICTS
102
B
-rw-rw-r--
2022-10-31 11:36
bug68381-log-level-warning.phpt
687
B
-rw-rw-r--
2022-10-31 11:36
bug68391-conf-include-order.phpt
1.02
KB
-rw-rw-r--
2022-10-31 11:36
bug68420-ipv4-all-addresses.phpt
642
B
-rw-rw-r--
2022-10-31 11:36
bug68421-ipv6-access-log.phpt
843
B
-rw-rw-r--
2022-10-31 11:36
bug68423-multi-pool-all-pms.phpt
1.08
KB
-rw-rw-r--
2022-10-31 11:36
bug68428-ipv6-allowed-clients.phpt
802
B
-rw-rw-r--
2022-10-31 11:36
bug68442-signal-reload.phpt
915
B
-rw-rw-r--
2022-10-31 11:36
bug68458-pm-no-start-server.phpt
665
B
-rw-rw-r--
2022-10-31 11:36
bug69625-no-script-filename.phpt
761
B
-rw-rw-r--
2022-10-31 11:36
bug72573-http-proxy.phpt
1.05
KB
-rw-rw-r--
2022-10-31 11:36
bug73342-nonblocking-stdio.phpt
795
B
-rw-rw-r--
2022-10-31 11:36
bug74083-concurrent-reload.phpt
1.73
KB
-rw-rw-r--
2022-10-31 11:36
bug75212-php-value-in-user-ini.phpt
977
B
-rw-rw-r--
2022-10-31 11:36
bug76601-reload-child-signals.phpt
2.63
KB
-rw-rw-r--
2022-10-31 11:36
bug77934-reload-process-control.phpt
959
B
-rw-rw-r--
2022-10-31 11:36
bug78323.phpt
683
B
-rw-rw-r--
2022-10-31 11:36
bug78599-path-info-underflow.phpt
1.04
KB
-rw-rw-r--
2022-10-31 11:36
bug80024-socket-reduced-inherit.phpt
897
B
-rw-rw-r--
2022-10-31 11:36
bug80849-fpm.phpt
706
B
-rw-rw-r--
2022-10-31 11:36
fastcgi_finish_request_basic.phpt
734
B
-rw-rw-r--
2022-10-31 11:36
fcgi.inc
19.84
KB
-rw-rw-r--
2022-10-31 11:36
fpm_get_status_basic.phpt
1.84
KB
-rw-rw-r--
2022-10-31 11:36
getallheaders.phpt
1.02
KB
-rw-rw-r--
2022-10-31 11:36
log-bm-in-shutdown-fn.phpt
886
B
-rw-rw-r--
2022-10-31 11:36
log-bm-limit-1024-msg-80.phpt
860
B
-rw-rw-r--
2022-10-31 11:36
log-bm-limit-2048-msg-4000.phpt
876
B
-rw-rw-r--
2022-10-31 11:36
log-bwd-limit-1050-msg-2048.phpt
848
B
-rw-rw-r--
2022-10-31 11:36
log-bwd-limit-1050-msg-2900.phpt
818
B
-rw-rw-r--
2022-10-31 11:36
log-bwd-limit-64-too-low-error.phpt
736
B
-rw-rw-r--
2022-10-31 11:36
log-bwd-limit-8000-msg-4096.phpt
818
B
-rw-rw-r--
2022-10-31 11:36
log-bwd-msg-with-nl.phpt
869
B
-rw-rw-r--
2022-10-31 11:36
log-bwd-multiple-msgs-stdout-stderr.phpt
1018
B
-rw-rw-r--
2022-10-31 11:36
log-bwd-multiple-msgs.phpt
972
B
-rw-rw-r--
2022-10-31 11:36
log-bwp-limit-1024-msg-120.phpt
846
B
-rw-rw-r--
2022-10-31 11:36
log-bwp-limit-1500-msg-3300.phpt
849
B
-rw-rw-r--
2022-10-31 11:36
log-bwp-msg-flush-split-fallback.phpt
959
B
-rw-rw-r--
2022-10-31 11:36
log-bwp-msg-flush-split-real.phpt
855
B
-rw-rw-r--
2022-10-31 11:36
log-bwp-realloc-buffer.phpt
1.07
KB
-rw-rw-r--
2022-10-31 11:36
log-dwd-limit-1050-msg-2048.phpt
845
B
-rw-rw-r--
2022-10-31 11:36
log-dwd-limit-1050-msg-2900.phpt
815
B
-rw-rw-r--
2022-10-31 11:36
log-dwd-limit-8000-msg-4096.phpt
815
B
-rw-rw-r--
2022-10-31 11:36
log-dwp-limit-1000-msg-2000.phpt
846
B
-rw-rw-r--
2022-10-31 11:36
logtool.inc
14.82
KB
-rw-rw-r--
2022-10-31 11:36
main-global-prefix.phpt
1.05
KB
-rw-rw-r--
2022-10-31 11:36
main-version.phpt
330
B
-rw-rw-r--
2022-10-31 11:36
pool-apparmor-basic.phpt
1.23
KB
-rw-rw-r--
2022-10-31 11:36
pool-prefix.phpt
1
KB
-rw-rw-r--
2022-10-31 11:36
proc-idle-timeout.phpt
877
B
-rw-rw-r--
2022-10-31 11:36
proc-no-start-server.phpt
742
B
-rw-rw-r--
2022-10-31 11:36
proc-user-ignored.phpt
795
B
-rw-rw-r--
2022-10-31 11:36
reload-uses-sigkill-as-last-measure.phpt
1.33
KB
-rw-rw-r--
2022-10-31 11:36
response.inc
6.62
KB
-rw-rw-r--
2022-10-31 11:36
skipif.inc
377
B
-rw-rw-r--
2022-10-31 11:36
socket-invalid-allowed-clients.phpt
1022
B
-rw-rw-r--
2022-10-31 11:36
socket-ipv4-allowed-clients.phpt
808
B
-rw-rw-r--
2022-10-31 11:36
socket-ipv4-basic.phpt
577
B
-rw-rw-r--
2022-10-31 11:36
socket-ipv4-fallback.phpt
910
B
-rw-rw-r--
2022-10-31 11:36
socket-ipv6-any.phpt
749
B
-rw-rw-r--
2022-10-31 11:36
socket-ipv6-basic.phpt
617
B
-rw-rw-r--
2022-10-31 11:36
socket-uds-acl.phpt
1.64
KB
-rw-rw-r--
2022-10-31 11:36
socket-uds-basic.phpt
649
B
-rw-rw-r--
2022-10-31 11:36
socket-uds-numeric-ugid-nonroot.phpt
1.26
KB
-rw-rw-r--
2022-10-31 11:36
socket-uds-numeric-ugid.phpt
1.13
KB
-rw-rw-r--
2022-10-31 11:36
status-basic.phpt
970
B
-rw-rw-r--
2022-10-31 11:36
status.inc
5.34
KB
-rw-rw-r--
2022-10-31 11:36
tester.inc
37.09
KB
-rw-rw-r--
2022-10-31 11:36
Save
Rename
<?php namespace FPM; class Status { const HTML_TITLE = 'PHP-FPM Status Page'; /** * @var array */ private $contentTypes = [ 'plain' => 'text/plain', 'html' => 'text/html', 'xml' => 'text/xml', 'json' => 'application/json', ]; /** * @var array */ private $defaultFields = [ 'pool' => '\w+', 'process manager' => '(static|dynamic|ondemand)', 'start time' => '\d+\/\w{3}\/\d{4}:\d{2}:\d{2}:\d{2}\s[+-]\d{4}', 'start since' => '\d+', 'accepted conn' => '\d+', 'listen queue' => '\d+', 'max listen queue' => '\d+', 'listen queue len' => '\d+', 'idle processes' => '\d+', 'active processes' => '\d+', 'total processes' => '\d+', 'max active processes' => '\d+', 'max children reached' => '\d+', 'slow requests' => '\d+', ]; /** * Check status page. * * @param Response $response * @param array $fields * @param string $type * @throws \Exception */ public function checkStatus(Response $response, array $fields, string $type) { if (!isset($this->contentTypes[$type])) { throw new \Exception('Invalid content type ' . $type); } $body = $response->getBody($this->contentTypes[$type]); if ($body === null) { return; } $method = "checkStatus" . ucfirst($type); $this->$method($body, array_merge($this->defaultFields, $fields)); } /** * Make status check for status page. * * @param string $body * @param array $fields * @param string $rowPattern * @param string $header * @param string $footer * @param null|callable $nameTransformer * @param null|callable $valueTransformer * @param bool $startTimeTimestamp * @param bool $closingName */ private function makeStatusCheck( string $body, array $fields, string $rowPattern, string $header = '', string $footer = '', $nameTransformer = null, $valueTransformer = null, bool $startTimeTimestamp = false, bool $closingName = false ) { if ($startTimeTimestamp && $fields['start time'][0] === '\\') { $fields['start time'] = '\d+'; } $pattern = '(' . $header; foreach ($fields as $name => $value) { if ($nameTransformer) { $name = call_user_func($nameTransformer, $name); } if ($valueTransformer) { $value = call_user_func($valueTransformer, $value); } if ($closingName) { $pattern .= sprintf($rowPattern, $name, $value, $name); } else { $pattern .= sprintf($rowPattern, $name, $value); } } $pattern = rtrim($pattern, $rowPattern[strlen($rowPattern) - 1]); $pattern .= $footer . ')'; if (!preg_match($pattern, $body)) { echo "ERROR: Expected body does not match pattern\n"; echo "BODY:\n"; var_dump($body); echo "PATTERN:\n"; var_dump($pattern); } } /** * Check plain status page. * * @param string $body * @param array $fields */ protected function checkStatusPlain(string $body, array $fields) { $this->makeStatusCheck($body, $fields, "%s:\s+%s\n"); } /** * Check html status page. * * @param string $body * @param array $fields */ protected function checkStatusHtml(string $body, array $fields) { $header = "<!DOCTYPE html PUBLIC \"-//W3C//DTD XHTML 1.0 Strict//EN\" " . "\"http://www.w3.org/TR/xhtml1/DTD/xhtml1-strict.dtd\">\n" . "<html xmlns=\"http://www.w3.org/1999/xhtml\" xml:lang=\"en\" lang=\"en\">\n" . "<head><title>" . self::HTML_TITLE . "</title></head>\n" . "<body>\n<table>\n"; $footer = "\n</table>\n</body></html>"; $this->makeStatusCheck( $body, $fields, "<tr><th>%s</th><td>%s</td></tr>\n", $header, $footer ); } /** * Check xml status page. * * @param string $body * @param array $fields */ protected function checkStatusXml(string $body, array $fields) { $this->makeStatusCheck( $body, $fields, "<%s>%s</%s>\n", "<\?xml version=\"1.0\" \?>\n<status>\n", "\n</status>", function ($name) { return str_replace(' ', '-', $name); }, null, true, true ); } /** * Check json status page. * * @param string $body * @param array $fields */ protected function checkStatusJson(string $body, array $fields) { $this->makeStatusCheck( $body, $fields, '"%s":%s,', '{', '}', null, function ($value) { if (is_numeric($value) || $value === '\d+') { return $value; } return '"' . $value . '"'; }, true ); } }