[英]Getting HTTP 500 error accessing php for phpMyAdmin on ngnix
Getting the below error access http://45.76.144.192:8080/index.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"
Below is what i tried but still it does not work. 以下是我尝试过的方法,但仍然无法正常工作。
1. 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. 2。
sudo yum remove phpmyadmin
sudo yum autoremove phpmyadmin
sudo yum install phpmyadmin
Below is the php details: 以下是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
I am running everything with root user so permissions should not be an issue i guess. 我正在使用root用户运行所有内容,因此我认为权限应该不是问题。
Following Call to undefined function __() error - phpMyAdmin 跟随对未定义函数__()的调用错误-phpMyAdmin
Depending on your OS did you try: 您尝试根据您的操作系统进行以下操作:
(CentOS) (CentOS的)
sudo yum install php-mbstring
(Debian) (Debian的)
sudo apt-get install php7.0-mbstring
And then restart your apache process. 然后重新启动您的Apache进程。
Check the phpMyAdmin requirements 检查phpMyAdmin要求
- You need PHP 7.1.0 or newer, with session support, the Standard PHP Library (SPL) extension, hash, ctype, and JSON support.
您需要具有会话支持,标准PHP库(SPL)扩展,哈希,ctype和JSON支持的PHP 7.1.0或更高版本。
- The mbstring extension (see mbstring) is strongly recommended for performance reasons.
出于性能原因,强烈建议使用mbstring扩展名(请参阅mbstring)。
- To support uploading of ZIP files, you need the PHP zip extension.
要支持上传ZIP文件,您需要PHP zip扩展名。
- You need GD2 support in PHP to display inline thumbnails of JPEGs (“image/jpeg: inline”) with their original aspect ratio.
您需要PHP中的GD2支持才能显示JPEG的嵌入式缩略图(“图像/ jpeg:嵌入式”)及其原始纵横比。
- When using the cookie authentication (the default), the openssl extension is strongly suggested.
当使用cookie身份验证(默认设置)时,强烈建议使用openssl扩展名。
- To support upload progress bars, see 2.9 Seeing an upload progress bar.
要支持上传进度条,请参阅2.9查看上传进度条。
- To support XML and Open Document Spreadsheet importing, you need the libxml extension.
要支持XML和Open Document Spreadsheet导入,您需要libxml扩展名。
- To support reCAPTCHA on the login page, you need the openssl extension.
要在登录页面上支持reCAPTCHA,您需要openssl扩展名。
- To support displaying phpMyAdmin's latest version, you need to enable allow_url_open in your php.ini or to have the curl extension.
为了支持显示phpMyAdmin的最新版本,您需要在php.ini中启用allow_url_open或具有curl扩展名。
此命令有助于解决我的问题。
[root@amazon]# chgrp nginx -R /var/lib/php/session
声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.