簡體   English   中英

在ngnix上獲取HTTP 500錯誤以訪問phpMyAdmin的php

[英]Getting HTTP 500 error accessing php for phpMyAdmin on ngnix

獲取以下錯誤訪問權限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庫(SPL)擴展,哈希,ctype和JSON支持的PHP 7.1.0或更高版本。
  • 出於性能原因,強烈建議使用mbstring擴展名(請參閱mbstring)。
  • 要支持上傳ZIP文件,您需要PHP zip擴展名。
  • 您需要PHP中的GD2支持才能顯示JPEG的嵌入式縮略圖(“圖像/ jpeg:嵌入式”)及其原始縱橫比。
  • 當使用cookie身份驗證(默認設置)時,強烈建議使用openssl擴展名。
  • 要支持上傳進度條,請參閱2.9查看上傳進度條。
  • 要支持XML和Open Document Spreadsheet導入,您需要libxml擴展名。
  • 要在登錄頁面上支持reCAPTCHA,您需要openssl擴展名。
  • 為了支持顯示phpMyAdmin的最新版本,您需要在php.ini中啟用allow_url_open或具有curl擴展名。

此命令有助於解決我的問題。

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

暫無
暫無

聲明:本站的技術帖子網頁,遵循CC BY-SA 4.0協議,如果您需要轉載,請注明本站網址或者原文地址。任何問題請咨詢:yoyou2525@163.com.

 
粵ICP備18138465號  © 2020-2024 STACKOOM.COM