Skip to content

Commit

Permalink
Merge pull request #179 from phpmyadmin/remove-phpinfo
Browse files Browse the repository at this point in the history
Remove option to show phpinfo() ($cfg['ShowPhpInfo'])
  • Loading branch information
nijel committed Jul 26, 2016
2 parents 754c1c9 + e67e692 commit 3ec8ba8
Show file tree
Hide file tree
Showing 7 changed files with 2 additions and 59 deletions.
14 changes: 1 addition & 13 deletions doc/config.rst
Expand Up @@ -1823,11 +1823,6 @@ Main panel
You can additionally hide more information by using
:config:option:`$cfg['Servers'][$i]['verbose']`.

.. config:option:: $cfg['ShowPhpInfo']
:type: boolean
:default: false

.. config:option:: $cfg['ShowChgPassword']
:type: boolean
Expand All @@ -1838,18 +1833,11 @@ Main panel
:type: boolean
:default: true

Defines whether to display the :guilabel:`PHP information` and
Defines whether to display the
:guilabel:`Change password` links and form for creating database or not at
the starting main (right) frame. This setting does not check MySQL commands
entered directly.

Please note that to block the usage of ``phpinfo()`` in scripts, you have to
put this in your :file:`php.ini`:

.. code-block:: ini
disable_functions = phpinfo()
Also note that enabling the :guilabel:`Change password` link has no effect
with config authentication mode: because of the hard coded password value
in the configuration file, end users can't be allowed to change their
Expand Down
11 changes: 1 addition & 10 deletions index.php
Expand Up @@ -317,7 +317,7 @@
. ' </div>';
}

if ($GLOBALS['cfg']['ShowServerInfo'] || $GLOBALS['cfg']['ShowPhpInfo']) {
if ($GLOBALS['cfg']['ShowServerInfo']) {
echo '<div class="group">';
echo '<h2>' , __('Web server') , '</h2>';
echo '<ul>';
Expand Down Expand Up @@ -357,15 +357,6 @@
}
}

if ($cfg['ShowPhpInfo']) {
PMA_printListItem(
__('Show PHP information'),
'li_phpinfo',
'phpinfo.php' . $common_url_query,
null,
'_blank'
);
}
echo ' </ul>';
echo ' </div>';
}
Expand Down
1 change: 0 additions & 1 deletion libraries/common.inc.php
Expand Up @@ -309,7 +309,6 @@
'index.php',
'pdf_pages.php',
'pdf_schema.php',
//'phpinfo.php',
'server_binlog.php',
'server_collations.php',
'server_databases.php',
Expand Down
7 changes: 0 additions & 7 deletions libraries/config.default.php
Expand Up @@ -1038,13 +1038,6 @@
*/
$cfg['ShowStats'] = true;

/**
* show PHP info link
*
* @global boolean $cfg['ShowPhpInfo']
*/
$cfg['ShowPhpInfo'] = false;

/**
* show MySQL server and web server information
*
Expand Down
5 changes: 0 additions & 5 deletions libraries/config/messages.inc.php
Expand Up @@ -865,11 +865,6 @@
$strConfigShowFunctionFields_name = __('Show function fields');
$strConfigShowHint_desc = __('Whether to show hint or not.');
$strConfigShowHint_name = __('Show hint');
$strConfigShowPhpInfo_desc = __(
'Shows link to [a@https://php.net/manual/function.phpinfo.php]phpinfo()[/a] ' .
'output.'
);
$strConfigShowPhpInfo_name = __('Show phpinfo() link');
$strConfigShowServerInfo_name = __('Show detailed MySQL server information');
$strConfigShowSQL_desc = __(
'Defines whether SQL queries generated by phpMyAdmin should be displayed.'
Expand Down
1 change: 0 additions & 1 deletion libraries/config/setup.forms.php
Expand Up @@ -203,7 +203,6 @@
'ShowCreateDb',
'ShowStats',
'ShowServerInfo',
'ShowPhpInfo',
'ShowChgPassword');
$forms['Main_panel']['DbStructure'] = array(
'ShowDbStructureComment',
Expand Down
22 changes: 0 additions & 22 deletions phpinfo.php

This file was deleted.

0 comments on commit 3ec8ba8

Please sign in to comment.