简体   繁体   English

在CentOS上将PHP 5.3更新为PHP 5.5之后,我无法访问phpmyadmin

[英]I can not access phpmyadmin after updating PHP 5.3 to PHP 5.5 on CentOS

I updated phpadmin, it then gave error saying it needs latest version of PHP 5.5. 我更新了phpadmin,然后错误地指出需要最新版本的PHP 5.5。

So i tried to update the PHP using this method: http://anandarajpandey.com/2014/04/21/virtualmin-upgrate-php-5-3-to-php-5-4-php-5-5-or-higher-version-from-yum/ 因此,我尝试使用此方法更新PHP: http : //anandarajpandey.com/2014/04/21/virtualmin-upgrate-php-5-3-to-php-5-4-php-5-5-or -来自yum的更高版本/

Didnt work due to: 由于以下原因而无法工作:

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 

So i removed php-common using this: 所以我用这个删除了php-common:

yum -y remove php-common

Then I installed php 5.5 using: 然后我使用以下命令安装了PHP 5.5:

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

Then i checked php version it worked and was latest version. 然后我检查了它工作的php版本,并且是最新版本。 but i noticed that when removing php it also removed and renamed some conf files one of them being "/etc/httpd/conf.d/phpMyAdmin.conf" 但是我注意到,在删除php时,它也删除并重命名了一些conf文件,其中之一是“ /etc/httpd/conf.d/phpMyAdmin.conf”

I now get this error: (for http://198.154.62.131/phpMyAdmin/ ) 我现在收到此错误:(对于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: /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: / 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/ 

I am using webmin, CentOS Linux 5.11 我正在使用Webmin,CentOS Linux 5.11

any ideas how to bet phpmyadmin back? 任何想法如何赌phpmyadmin回来?

It seemed like the conf file was ok its just that some file/s was removed or changed in the usr/share/phpMyAdmin folder. 似乎conf文件可以正常使用,只是在usr / share / phpMyAdmin文件夹中已删除或更改了一些文件。

I renamed /etc/httpd/conf.d/phpMyAdmin.conf.rpmsave back to phpMyAdmin.conf 我将/etc/httpd/conf.d/phpMyAdmin.conf.rpm重新命名为phpMyAdmin.conf

I then did the following and it now works! 然后,我做了以下工作,现在可以工作了! cd /usr/share wget http://files.phpmyadmin.net/phpMyAdmin/4.5.0.2/phpMyAdmin-4.5.0.2-all-languages.zip unzip phpMyAdmin-4.5.0.2-all-languages.zip cd / usr / share 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

Opened File manager, renamed phpMyAdmin to phpMyAdminOld. 打开文件管理器,将phpMyAdmin重命名为phpMyAdminOld。 Deleted the downloaded zip file. 删除下载的zip文件。 Renamed phpMyAdmin-4.5.0.2-all-languages to phpMyAdmin. 将phpMyAdmin-4.5.0.2-all-languages重命名为phpMyAdmin。 Then copied the config.inc.php from phpMyAdminOld to phpMyAdmin folder. 然后将config.inc.php从phpMyAdminOld复制到phpMyAdmin文件夹。 restarted apache. 重新启动了Apache。 then it worked. 然后它起作用了。

But now i get this error: 但是现在我得到这个错误:

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

声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM