【问题标题】:Internal server error on phpMyAdminphpMyAdmin 上的内部服务器错误
【发布时间】:2015-11-17 02:46:24
【问题描述】:

我刚刚重新安装了我的网络服务器,发现自己遇到了一个我一无所知的错误:(

我使用的是 apache 2,我假设我的 mysql 环境安装良好,尽管我不知道如何检查。我刚刚在 www/ 文件夹中解压缩了 phpmyadmin 4.5,创建了 config 文件夹,赋予了它正确的权限,将我的 config.ini.php 移到了里面,但是每当我尝试访问 domainname/phpMyAdmin 或 domainname/phpMyAdmin/setup/得到这个:

Internal Server Error

The server encountered an internal error or misconfiguration and was unable to complete your request.

Please contact the server administrator, webmaster@domainname and inform them of the time the error occurred, and anything you might have done that may have caused the error.

More information about this error may be available in the server error log.

这里是 apache2 日志:

[2015 年 8 月 23 日星期日 19:11:23] [错误] [客户端 79.91.191.99] Application.cpp:350 中的 SoftException:脚本“/home/MGC/www/phpMyAdmin/index.php”的 UID 较小比min_uid

[Sun Aug 23 19:11:23 2015] [error] [client 79.91.191.99] 脚本听众提前结束:index.php

【问题讨论】:

  • 更改文件的用户和组以匹配网络服务器进程的用户,apache2 很可能您以 root 或其他身份解压缩
  • 我现在对 linux 还不是很熟悉,我用了一个简单的 chmod -R o+rwx 并且我不能再通过 ftp 访问了,我害怕我弄坏了一些东西

标签: php mysql apache phpmyadmin installation


【解决方案1】:

在 ssh 终端中运行以下命令

  1. 在 phpmyadmin 根目录中修复权限

    chmod -R 0755 *
    
  2. 寻找apache用户

    ps aux | egrep '(apache|httpd|www)'
    
  3. 在 phpmyadmin 目录之外设置所有权

    chown -R www-data:www-data *
    

www-data 是 ubuntu 上的 apache 用户,在你的发行版上可能不同

【讨论】:

  • 我可能在尝试自己修复时搞砸了,我现在无权通过家里的网络浏览器访问服务器。我仍然可以使用 MGC 用户通过 FTP 创建和删除文件我在 www/ 有一个小 index.php 文件,空白,以测试我是否可以访问它,但它给了我一个标准的 403 错误
  • 如果您有 FTP 访问权限,则删除所有 phpmyadmin 文件,通过 ftp 再次上传 zip 并从 cpanel 解压缩
  • 这里是www/中的权限设置:puu.sh/jLMtN/240cab73b4.png(我以MGC身份登录)
  • 我根本无法访问域名/,它甚至不再是 phpmyadmin,它就是全部:/
  • 403 禁止您没有权限访问此服务器上的 /。
猜你喜欢
  • 2017-12-03
  • 2020-10-06
  • 2019-03-17
  • 2017-08-27
  • 2021-05-04
  • 1970-01-01
  • 1970-01-01
  • 2015-09-26
  • 1970-01-01
相关资源
最近更新 更多