gpt4 book ai didi

php - 在 CentOS 上将 PHP 5.3 更新到 PHP 5.5 后,我无法访问 phpmyadmin

转载 作者:太空宇宙 更新时间:2023-11-04 13:04:23 25 4
gpt4 key购买 nike

我更新了 phpadmin,然后它报错说它需要最新版本的 PHP 5.5。

所以我尝试使用这种方法更新 PHP: http://anandarajpandey.com/2014/04/21/virtualmin-upgrate-php-5-3-to-php-5-4-php-5-5-or-higher-version-from-yum/

没有工作是因为:

php55w-common-5.5.29-1.w5.i386 from webtatic-el5 has depsolving problems
--> php55w-common conflicts with php-common
Error: php55w-common conflicts with php-common

所以我用这个删除了 php-common:

yum -y remove php-common

然后我使用以下方法安装了 php 5.5:

yum -y install php55w php55w-opcache php55w-common php55w-mysql php55w-mbstring php55w-cli php55w-gd php55w-pdo php55w-mcrypt

然后我检查了它工作的 php 版本并且是最新版本。但我注意到,在删除 php 时,它还删除并重命名了一些 conf 文件,其中一个是“/etc/httpd/conf.d/phpMyAdmin.conf”

我现在收到此错误:(对于 http://198.154.62.131/phpMyAdmin/)

Forbidden
You don't have permission to access /phpMyAdmin/ on this server.
Apache/2.2.3 (CentOS) Server at 198.154.62.131 Port 80

/etc/httpd/conf.d/phpMyAdmin.conf:

Alias /phpMyAdmin "/usr/share/phpMyAdmin"

<Directory /usr/share/phpMyAdmin/>
<IfModule mod_authz_core.c>
# Apache 2.4
<RequireAny>
#Require ip 127.0.0.1
#Require ip ::1
Require all granted
</RequireAny>
</IfModule>
<IfModule !mod_authz_core.c>
# Apache 2.2
Order Allow,Deny
Allow from all
# Order Deny,Allow
# Deny from All
# Allow from 127.0.0.1
# Allow from ::1
</IfModule>
</Directory>

<Directory /usr/share/phpMyAdmin/setup/>
<IfModule mod_authz_core.c>
# Apache 2.4
Require local
</IfModule>
<IfModule !mod_authz_core.c>
# Apache 2.2
Order Deny,Allow
#Deny from All
Allow from 127.0.0.1
Allow from ::1
Allow from 198.154.62.131
</IfModule>
</Directory>

/var/log/httpd/error_log:

[Mon Oct 12 21:11:24 2015] [error] [client 193.109.196.106] Directory index forbidden by Options directive: /usr/share/phpMyAdmin/ 

我正在使用 webmin,CentOS Linux 5.11

有什么想法可以让 phpmyadmin 回归吗?

最佳答案

conf 文件似乎没问题,只是 usr/share/phpMyAdmin 文件夹中的某些文件被删除或更改。

我将/etc/httpd/conf.d/phpMyAdmin.conf.rpmsave 重命名回 phpMyAdmin.conf

然后我做了以下操作,现在可以使用了!cd/usr/共享wget http://files.phpmyadmin.net/phpMyAdmin/4.5.0.2/phpMyAdmin-4.5.0.2-all-languages.zip解压 phpMyAdmin-4.5.0.2-all-languages.zip

打开文件管理器,将 phpMyAdmin 重命名为 phpMyAdminOld。删除了下载的 zip 文件。将 phpMyAdmin-4.5.0.2-all-languages 重命名为 phpMyAdmin。然后将 config.inc.php 从 phpMyAdminOld 复制到 phpMyAdmin 文件夹。重新启动 Apache 。然后就成功了。

但是现在我得到这个错误:

Your PHP MySQL library version 5.0.67 differs from your MySQL server version 5.5.28. This may cause unpredictable behavior.

关于php - 在 CentOS 上将 PHP 5.3 更新到 PHP 5.5 后,我无法访问 phpmyadmin,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/33086921/

25 4 0
Copyright 2021 - 2024 cfsdn All Rights Reserved 蜀ICP备2022000587号
广告合作:1813099741@qq.com 6ren.com