当前位置:论坛首页 > Linux面板 > 求助

【已解决】插件phpmyadmin无法打开

发表在 Linux面板2025-6-3 16:58 [复制链接] 2 286

为了能快速了解并处理您的问题,请提供以下基础信息:
面板、插件版本:宝塔linux面板 9.0.0
  系统版本:CentOS 7.8.2003 x86_64(Py3.7.9)

问题描述:运行环境:Nginx 1.18.0 + MySQL 5.7.44 + PHP 7.1.33 + phpMyAdmin 4.9
其他网站项目运行正常,但phpMyAdmin无法访问,报错:No input file specified.  请问要如何处理才能正常访问phpMyAdmin?


  
相关截图(日志、错误):
nginx.conf配置:
server
    {
        listen 8888;
        server_name phpmyadmin;
        index index.html index.htm index.php;
        root  /www/server/phpmyadmin;
             location ~ /tmp/ {
                 return 403;
             }
        #error_page   404   /404.html;
        include enable-php.conf;
        location ~ .*\.(gif|jpg|jpeg|png|bmp|swf)$
        {
            expires      30d;
        }
        location ~ .*\.(js|css)?$
        {
            expires      12h;
        }
        location ~ /\.
        {
            deny all;
        }
        access_log  /www/wwwlogs/access.log;
    }
include /www/server/panel/vhost/nginx/*.conf;
}
enable-php.conf配置:
location ~ [^/]\.php(/|$)
    {
        try_files $uri =404;
        fastcgi_pass  unix:/tmp/php-cgi-71.sock;
        fastcgi_index index.php;
        include fastcgi.conf;
    }

fastcgi.conf配置:

fastcgi_param  SCRIPT_FILENAME    $document_root$fastcgi_script_name;
fastcgi_param  QUERY_STRING       $query_string;
fastcgi_param  REQUEST_METHOD     $request_method;
fastcgi_param  CONTENT_TYPE       $content_type;
fastcgi_param  CONTENT_LENGTH     $content_length;

fastcgi_param  SCRIPT_NAME        $fastcgi_script_name;
fastcgi_param  REQUEST_URI        $request_uri;
fastcgi_param  DOCUMENT_URI       $document_uri;
fastcgi_param  DOCUMENT_ROOT      $document_root;
fastcgi_param  SERVER_PROTOCOL    $server_protocol;
fastcgi_param  REQUEST_SCHEME     $scheme;
fastcgi_param  HTTPS              $https if_not_empty;

fastcgi_param  GATEWAY_INTERFACE  CGI/1.1;
fastcgi_param  SERVER_SOFTWARE    nginx/$nginx_version;

fastcgi_param  REMOTE_ADDR        $remote_addr;
fastcgi_param  REMOTE_PORT        $remote_port;
fastcgi_param  SERVER_ADDR        $server_addr;
fastcgi_param  SERVER_PORT        $server_port;
fastcgi_param  SERVER_NAME        $server_name;

fastcgi_param PHP_ADMIN_VALUE "open_basedir=/www/wwwroot/:/tmp/:/proc/";


# PHP only, required if PHP was built with --enable-force-cgi-redirect
fastcgi_param  REDIRECT_STATUS    200;



使用道具 举报 只看该作者 回复
发表于 2025-6-4 09:30:17 | 显示全部楼层
fastcgi_param PHP_ADMIN_VALUE "open_basedir=/www/wwwroot/:/tmp/:/proc/";
这行配置加上phpmyadmin的目录,重启nginx
fastcgi_param  PHP_ADMIN_VALUE    "open_basedir=/www/wwwroot/:/tmp/:/proc/:/www/server/phpmyadmin/" ;
使用道具 举报 回复 支持 反对
发表于 2025-6-4 10:06:09 | 显示全部楼层
阿珂 发表于 2025-6-4 09:30
fastcgi_param PHP_ADMIN_VALUE "open_basedir=/www/wwwroot/:/tmp/:/proc/";
这行配置加上phpmyadmin的目 ...

可以了,谢谢
使用道具 举报 回复 支持 反对
您需要登录后才可以回帖 登录 | 立即注册

本版积分规则

普通问题处理

论坛响应时间:72小时

问题处理方式:排队(仅解答)

工作时间:白班:9:00 - 18:00

紧急运维服务

响应时间:3分钟

问题处理方式:宝塔专家1对1服务

工作时间:工作日:9:00 - 18:30

宝塔专业团队为您解决服务器疑难问题

点击联系技术免费分析

工作时间:09:00至18:30

快速回复 返回顶部 返回列表