【问题标题】:Create web server writable folder phpMyAdmin config file创建 Web 服务器可写文件夹 phpMyAdmin 配置文件
【发布时间】:2013-10-20 09:20:20
【问题描述】:

我收到了这个问题:

请按照文档中的说明在 phpMyAdmin 顶级目录中创建 Web 服务器可写文件夹配置。否则您将只能下载或显示它。

我能做些什么来解决这个问题。我的 phpMyAdmin 版本是 3.5.8.2

【问题讨论】:

  • 您是否尝试过设置文件夹的写入权限?您可能需要通过数字来做到这一点。
  • 您是否尝试过按照文档进行操作?可能是this setup guide 之类的东西?

标签: phpmyadmin


【解决方案1】:

转到您的 phpMyAdmin 文件夹,通常是 /usr/share/phpMyAdmin 以获得最新版本。

创建一个名为config的文件夹:

cd /usr/share/phpMyAdmin
mkdir config                        # create directory for saving
chmod o+rw config                   # give it world writable permissions - this will be removed once your configuration has been saved on the server [as this directory is required by the application to be removed as a security measure]

生成配置后,您可以将其从 config 文件夹 /usr/share/phpMyAdmin/config.inc.php 复制到您的安装文件夹,或者对于 Redhat 风格,复制到您的 /etc/phpMyAdmin 文件夹。

有点晚了,但重要的是思想。

  • 仅供参考 - 所有这些信息都可以在 phpMyAdmin 文档中找到

【讨论】:

  • 在 Mac OS 上怎么做?
【解决方案2】:

在最初的问题被问了很久之后,但我遇到了同样的问题。

在我的 Ubuntu 14.04 服务器上,您需要使其可写的文件位于 /var/lib/phpmyadminconfig.inc.phproot:www-data 所有,因此设置组写入标志修复它:660

我通过修改\usr\share\phpmyadmin\setup\frames\index.inc.php(第 48 行)中的代码解决了这个问题,其中 phpMyAdmin 执行检查并报告错误。我让错误打印文件路径:

check_config_rw($config_readable, $config_writable, $config_exists);
if (!$config_writable || !$config_readable) {
    $file_path = ConfigFile::getInstance()->getFilePath();
    messages_set(
        'error', 'config_rw', __('Cannot load or save configuration to '.$file_path),
        PMA_lang(__('Please create web server writable folder [em]config[/em] in phpMyAdmin top level directory as described in [doc@setup_script]documentation[/doc]. Otherwise you will be only able to download or display it.'))
    );
}

【讨论】:

  • 关于权限问题,这来自PMA setup script:Debian 和 Ubuntu 已经简化了这个设置,你需要做的就是执行/usr/sbin/pma-configure,然后在你完成之后/usr/sbin/pma-secure。跨度>
【解决方案3】:

如果你不能在 phpMyAdmin 的文件夹中创建一个可写的文件夹“config”,这不是一个大问题。您将能够将创建的配置下载到文件中,但您必须能够将下载的 config.inc.php 放回 phpMyAdmin 的文件夹中。

【讨论】:

    猜你喜欢
    • 1970-01-01
    • 1970-01-01
    • 1970-01-01
    • 2022-07-08
    • 2011-01-09
    • 2018-12-18
    • 2016-09-26
    • 2012-04-02
    • 2020-01-04
    相关资源
    最近更新 更多