Warning: file_get_contents(/data/phpspider/zhask/data//catemap/0/search/2.json): failed to open stream: No such file or directory in /data/phpspider/zhask/libs/function.php on line 167

Warning: Invalid argument supplied for foreach() in /data/phpspider/zhask/libs/tag.function.php on line 1116

Notice: Undefined index: in /data/phpspider/zhask/libs/function.php on line 180

Warning: array_chunk() expects parameter 1 to be array, null given in /data/phpspider/zhask/libs/function.php on line 181
PhpMyAdmin在开始时对非对象抛出致命错误isUserType()。显示空白页_Phpmyadmin - Fatal编程技术网

PhpMyAdmin在开始时对非对象抛出致命错误isUserType()。显示空白页

PhpMyAdmin在开始时对非对象抛出致命错误isUserType()。显示空白页,phpmyadmin,Phpmyadmin,当我将$cfg['ServerDefault']设置为1(我的本地主机)时,我可以正常使用PhpMyAdmin。但是我需要向用户提供一个可能的服务器列表 当我将$cfg['ServerDefault']切换为0时,尽管PhpMyadmin不再加载。显示空白页,错误日志显示以下消息: [error] [client xxx.xxx.xxx.xxx] PHP Fatal error: Call to a member function isUserType() on a non-object in

当我将$cfg['ServerDefault']设置为1(我的本地主机)时,我可以正常使用PhpMyAdmin。但是我需要向用户提供一个可能的服务器列表

当我将$cfg['ServerDefault']切换为0时,尽管PhpMyadmin不再加载。显示空白页,错误日志显示以下消息:

[error] [client xxx.xxx.xxx.xxx] PHP Fatal error:  Call to a member function isUserType() on a non-object in /htdocs/libraries/Menu.class.php on line 511

这可能有什么问题?

看起来用户需要拥有超级用户权限才能选择服务器。以下是错误引用的Menu.class.php中的函数:

 /**
 * Returns the server tabs as an array
 *
 * @return array Data for generating server tabs
 */
private function _getServerTabs()
{
    $is_superuser = isset($GLOBALS['dbi']) && $GLOBALS['dbi']->isSuperuser();
    $isCreateOrGrantUser = $GLOBALS['dbi']->isUserType('grant')
        || $GLOBALS['dbi']->isUserType('create');
    $binary_logs = null;
    $notDrizzle = ! defined('PMA_DRIZZLE')
        || (defined('PMA_DRIZZLE') && ! PMA_DRIZZLE);
    if (isset($GLOBALS['dbi']) && $notDrizzle) {
        if (PMA_Util::cacheExists('binary_logs')) {
            $binary_logs = PMA_Util::cacheGet('binary_logs');
        } else {
            $binary_logs = $GLOBALS['dbi']->fetchResult(
                'SHOW MASTER LOGS',
                'Log_name',
                null,
                null,
                PMA_DatabaseInterface::QUERY_STORE
            );
            PMA_Util::cacheSet('binary_logs', $binary_logs);
        }
    }
bool$is_超级用户必须为true才能访问服务器选项卡数组。如果您以root用户身份请求该页面,它应该可以工作。

这是错误。。。
已通过或下一版本升级修复。

我只是想知道否决票是为了什么?我明白了,我的格式应该有所不同,下次我会尽量记住这一点。但是第二次否决票是关于什么的呢?这不是一个问题,我可以找到任何有关的信息,即使在广泛的谷歌搜索和通过stackoverflow搜索。有很多东西有点相似或相似的效果,但没有什么是我真正的问题。很遗憾,我在这台机器上没有根。所以我不能测试这个。但是这不能是这个Web服务需要作为根用户运行的应用程序的设计。也没有在文档中读到任何关于这种必要性的内容。是否有一种方法可以在没有根权限的情况下使用此功能?请尝试转到/phpMyAdmin/setup并单击“添加服务器”。在此填写您希望用户能够从中选择的服务器之一的详细信息。在“服务器配置”选项卡下,选中“允许根”复选框,这已为我添加的所有服务器设置。不会改变任何事情。终于有了正确的答案。这是真的。新版本修复了这个问题。