【问题标题】:I can not access phpmyadmin after updating PHP 5.3 to PHP 5.5 on CentOS在 CentOS 上将 PHP 5.3 更新到 PHP 5.5 后,我无法访问 phpmyadmin
【发布时间】:2016-01-10 06:35:05
【问题描述】:

我更新了 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?

【问题讨论】:

  • 再次用 yum 安装 phpMyAdmin?删除 php-common 可能也删除了 phpMyAdmin,当您使用包管理系统安装它时

标签: php linux apache phpmyadmin


【解决方案1】:

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

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

然后我做了以下操作,现在可以了! cd /usr/share wgethttp://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 文件夹。重新启动阿帕奇。然后就成功了。

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

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

【讨论】:

    猜你喜欢
    • 2012-06-11
    • 2014-12-27
    • 2013-07-02
    • 1970-01-01
    • 2017-05-13
    • 1970-01-01
    • 2013-11-23
    • 2015-05-20
    • 2018-02-07
    相关资源
    最近更新 更多