php - phpMyAdmin 上的内部服务器错误

标签 php mysql apache phpmyadmin installation

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

我正在使用 apache 2,我假设我的 mysql 环境安装良好,尽管我不知道如何检查它。我刚刚将 phpmyadmin 4.5 解压缩到 www/文件夹,创建了 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 日志:

[Sun Aug 23 19:11:23 2015] [error] [client 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

最佳答案

在 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 用户,在你的发行版上可能不同

关于php - phpMyAdmin 上的内部服务器错误,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/32169407/

相关文章:

python - 在python中执行存储过程

php - 重新启动 Apache 终止后台进程

java - 连接到本地主机时出现连接错误

http - 什么是 httpd <defunct>?

php - 简单的 PHP If/ElseIf 语句不起作用

php - mysql_fetch_array()/mysql_fetch_assoc()/mysql_fetch_row()/mysql_num_rows 等...期望参数 1 是资源

php - 如何在图像上生成不同颜色的图层?

php - wp-bootstrap-navwalker 断点更改

php - 如何从最后一个日期算起 30 天 - Laravel 和 Sql

javascript - PHP 将多个带有标题的文件上传到 MySQL