在NGNIX上获取http 500错误访问phpmyadmin的PHP



获取以下错误访问http://45.76.144.192:8080/index.php

[error] 6016#0: *30 FastCGI sent in stderr: "PHP message: PHP Fatal error:  Uncaught Error: Call to undefined function __() in /usr/share/phpMyAdmin/libraries/core.lib.php:245
Stack trace:
#0 /usr/share/phpMyAdmin/libraries/session.inc.php(100): PMA_fatalError('Error during se...')
#1 /usr/share/phpMyAdmin/libraries/common.inc.php(350): require('/usr/share/phpM...')
#2 /usr/share/phpMyAdmin/index.php(12): require_once('/usr/share/phpM...')
#3 {main}
  thrown in /usr/share/phpMyAdmin/libraries/core.lib.php on line 245" while reading response header from upstream, client: 45.248.66.156, server: _, request: "GET /index.php HTTP/1.1", upstream: "fastcgi://127.0.0.1:9000", host: "45.76.144.192:8080"

下面是我尝试的,但仍然无法使用。

1。

chmod 644 /usr/share/phpMyAdmin/setup/frames/config.inc.php
chmod 644 /usr/share/phpMyAdmin/test/test_data/config.inc.php
chmod -R 775 /var/opt/remi/php72/lib/php/session

2。

sudo  yum remove  phpmyadmin
sudo  yum autoremove  phpmyadmin
sudo yum install phpmyadmin

以下是PHP详细信息:

php72 -v
PHP 7.2.15 (cli) (built: Feb  5 2019 18:05:51) ( NTS )
Copyright (c) 1997-2018 The PHP Group
Zend Engine v3.2.0, Copyright (c) 1998-2018 Zend Technologies
    with Zend OPcache v7.2.15, Copyright (c) 1999-2018, by Zend Technologies
# php72 -m

[PHP Modules]
    bz2
    calendar
    Core
    ctype
    curl
    date
    dom
    exif
    fileinfo
    filter
    ftp
    gd
    gettext
    hash
    iconv
    json
    libxml
    mbstring
    mysqli
    mysqlnd
    openssl
    pcntl
    pcre
    PDO
    pdo_mysql
    pdo_sqlite
    Phar
    readline
    Reflection
    session
    SimpleXML
    sockets
    SPL
    sqlite3
    standard
    tokenizer
    wddx
    xml
    xmlreader
    xmlrpc
    xmlwriter
    xsl
    Zend OPcache
    zlib
    [Zend Modules]
    Zend OPcache
uname -a
Linux myhost 3.10.0-862.14.4.el7.x86_64 #1 SMP Wed Sep 26 15:12:11 UTC 2018 x86_64 x86_64 x86_64 GNU/Linux

我正在使用root用户运行所有内容,因此权限不应该是我猜的问题。

呼叫未定义函数__()错误-phpmyadmin

根据您的操作系统,您是否尝试过:

(Centos)

sudo yum install php-mbstring

(debian)

sudo apt-get install php7.0-mbstring

然后重新启动您的Apache过程。

检查phpmyadmin要求

  • 您需要php 7.1.0或更新,并在会话支持下,标准PHP库(SPL)扩展名,哈希,CTYPE和JSON支持。
  • 由于表现原因,强烈建议使用MBSTRING扩展名(请参阅MBSTRING)。
  • 要支持上传zip文件,您需要php zip扩展名。
  • 您需要PHP中的GD2支持以显示JPEGS的内联缩略图(" Image/Jpeg:inline")及其原始纵横比。
  • 使用cookie身份验证(默认)时,强烈建议使用OpenSSL扩展。
  • 要支持上传进度条,请参阅2.9查看上传进度栏。
  • 要支持XML和打开文档电子表格导入,您需要Libxml扩展名。
  • 要支持登录页面上的recaptcha,您需要OpenSSL扩展。
  • 为了支持显示PhpMyAdmin的最新版本,您需要在php.ini中启用lashe_url_open或具有卷曲扩展。

此命令帮助解决了我的问题。

[root@amazon]# chgrp nginx -R /var/lib/php/session

最新更新