mirror of
https://github.com/Froxlor/Froxlor.git
synced 2024-09-21 10:27:29 +00:00
show message on display-failure of phpinfo()-page, thx to papa-smurf for the hint
Signed-off-by: Michael Kaufmann (d00p) <d00p@froxlor.org>
This commit is contained in:
parent
e7f54503c1
commit
4794c21fb4
@ -105,14 +105,14 @@ if ($page == 'overview' && $userinfo['change_serversettings'] == '1') {
|
||||
} elseif($page == 'phpinfo'
|
||||
&& $userinfo['change_serversettings'] == '1'
|
||||
) {
|
||||
ob_start();
|
||||
phpinfo();
|
||||
$phpinfo = array('phpinfo' => array());
|
||||
if (preg_match_all(
|
||||
'#(?:<h2>(?:<a name=".*?">)?(.*?)(?:</a>)?</h2>)|(?:<tr(?: class=".*?")?><t[hd](?: class=".*?")?>(.*?)\s*</t[hd]>(?:<t[hd](?: class=".*?")?>(.*?)\s*</t[hd]>(?:<t[hd](?: class=".*?")?>(.*?)\s*</t[hd]>)?)?</tr>)#s',
|
||||
ob_get_clean(), $matches, PREG_SET_ORDER
|
||||
)
|
||||
) {
|
||||
ob_start();
|
||||
phpinfo();
|
||||
$phpinfo = array('phpinfo' => array());
|
||||
if (preg_match_all(
|
||||
'#(?:<h2>(?:<a name=".*?">)?(.*?)(?:</a>)?</h2>)|(?:<tr(?: class=".*?")?><t[hd](?: class=".*?")?>(.*?)\s*</t[hd]>(?:<t[hd](?: class=".*?")?>(.*?)\s*</t[hd]>(?:<t[hd](?: class=".*?")?>(.*?)\s*</t[hd]>)?)?</tr>)#s',
|
||||
ob_get_clean(), $matches, PREG_SET_ORDER
|
||||
)
|
||||
) {
|
||||
foreach ($matches as $match) {
|
||||
$end = array_keys($phpinfo);
|
||||
$end = end($end);
|
||||
@ -143,6 +143,8 @@ if ($page == 'overview' && $userinfo['change_serversettings'] == '1') {
|
||||
eval("\$phpinfohtml .= \"" . getTemplate("settings/phpinfo/phpinfo_table") . "\";");
|
||||
}
|
||||
$phpinfo = $phpinfohtml;
|
||||
} else {
|
||||
standard_error($lng['error']['no_phpinfo']);
|
||||
}
|
||||
eval("echo \"" . getTemplate("settings/phpinfo") . "\";");
|
||||
|
||||
|
@ -1835,3 +1835,4 @@ $lng['serversettings']['panel_password_special_char']['title'] = 'Special charac
|
||||
$lng['serversettings']['panel_password_special_char']['description'] = 'One of these characters is required if the above option is set.';
|
||||
$lng['phpfpm']['use_mod_proxy']['title'] = 'Use mod_proxy / mod_proxy_fcgi';
|
||||
$lng['phpfpm']['use_mod_proxy']['description'] = 'Activate to use php-fpm via mod_proxy_fcgi. Requires at least apache-2.4.9';
|
||||
$lng['error']['no_phpinfo'] = 'Sorry, unable to read phpinfo()';
|
||||
|
@ -1559,3 +1559,4 @@ $lng['serversettings']['panel_password_special_char']['title'] = 'Sonderzeichen-
|
||||
$lng['serversettings']['panel_password_special_char']['description'] = 'Mindestens eines dieser Sonderzeichen muss in dem Passwort vorkommen, sofern die Sonderzeichen-Option aktiviert ist.';
|
||||
$lng['phpfpm']['use_mod_proxy']['title'] = 'Verwende mod_proxy / mod_proxy_fcgi';
|
||||
$lng['phpfpm']['use_mod_proxy']['description'] = 'Diese Option kann aktiviert werden, um php-fpm via mod_proxy_fcgi einzubinden. Dies setzt mindestens apache-2.4.9 voraus';
|
||||
$lng['error']['no_phpinfo'] = 'Entschuldigung, es ist nicht möglich die phpinfo() auszulesen.';
|
||||
|
Loading…
Reference in New Issue
Block a user