php 我无法访问 http://localhost/phpmyadmin/

声明:本页面是StackOverFlow热门问题的中英对照翻译,遵循CC BY-SA 4.0协议,如果您需要使用它,必须同样遵循CC BY-SA许可,注明原文地址和作者信息,同时你必须将它归于原作者(不是我):StackOverFlow 原文地址: http://stackoverflow.com/questions/10111455/
Warning: these are provided under cc-by-sa 4.0 license. You are free to use/share it, But you must attribute it to the original authors (not me): StackOverFlow

提示:将鼠标放在中文语句上可以显示对应的英文。显示中英文
时间:2020-08-24 21:24:10  来源:igfitidea点击:

I can't access http://localhost/phpmyadmin/

phpphpmyadmin

提问by user1327157

Problem:

问题:

I can't access localhost/phpmyadmin/

我无法访问 localhost/phpmyadmin/

before I can access localhost/phpmyadmin/but today when I'm trying to access this page I got weird page

在我可以访问之前localhost/phpmyadmin/但是今天当我试图访问这个页面时我得到了奇怪的页面

also I can access localhost/xampp/without any problem

我也可以localhost/xampp/毫无问题地访问

Question:

题:

How can I solve this problem ?

我怎么解决这个问题 ?

回答by Lingani

what you need to do is to add phpmyadmin to the apache configuration:

您需要做的是将 phpmyadmin 添加到 apache 配置中:

sudo nano /etc/apache2/apache2.conf

Add the phpmyadmin config to the file:

将 phpmyadmin 配置添加到文件中:

Include /etc/phpmyadmin/apache.conf

then restart apache:

然后重启apache:

sudo service apache2 restart

On windows, I think you can just navigate to the apache2 config file and include the phpmyadmin config file as shown above, then restart apache

在 Windows 上,我认为您可以导航到 apache2 配置文件并包含如上所示的 phpmyadmin 配置文件,然后重新启动 apache

回答by Christine

A cleaner way is to create the new configuration file:

更简洁的方法是创建新的配置文件:

/etc/apache2/conf-available/phpmyadmin.conf

and write the following in it:

并在其中写入以下内容:

Include /etc/phpmyadmin/apache.conf

then, soft link the file to the directory /etc/apache2/conf-enabled:

然后,将文件软链接到目录/etc/apache2/conf-enabled

sudo ln -s /etc/apache2/conf-available/phpmyadmin.conf /etc/apache2/conf-enabled

回答by Akshay

You should use localhost:portnumber/phpmyadminHere the Portnumberis the number which you set for your web server or if you have not set it until now it is by Default - 80.

您应该使用localhost:portnumber/phpmyadminHere the Portnumberis the number that you set for your web server or if you have not set it now it is by Default - 80

回答by Manibala Sinha

when you run Xampp, check the apache port no. ex: if it is displaying port 80, then type

运行 Xampp 时,请检查 apache 端口号。例如:如果它显示端口 80,则键入

http://localhost:80/phpmyadmin/

After that it will display automatically

之后会自动显示

http://localhost/phpmyadmin/

http://localhost/phpmyadmin/

回答by Prateek Joshi

It generally occurswhen your default port for localhost is being used by another application(like apache tomcat). Easy fix is to stop the applicationand simply go to localhost/phpmyadmin.

它通常发生在您的 localhost默认端口被另一个应用程序(如 apache tomcat)使用时。简单的解决方法是停止应用程序,只需转到localhost/phpmyadmin 即可

In my case it workedafter stopping apache tomcat.

在我的情况下,它在停止apache tomcat工作

回答by Black

Make sure that both apache webserver and MySQL server are running. I had the same failure because I forgot to start my webserver.

确保 apache 网络服务器和 MySQL 服务器都在运行。我有同样的失败,因为我忘记启动我的网络服务器。

回答by blake305

Sometimes it's case sensitive. Have you tried going to http://localhost/phpMyAdmin?

有时它区分大小写。你试过去http://localhost/phpMyAdmin吗?

回答by Madara's Ghost

Based on your output, one of your plugins is messing up with the phpmyadmin. Try disabling all plugins to see if that works.

根据您的输出,您的插件之一与 phpmyadmin 混淆。尝试禁用所有插件以查看是否有效。

If it does, enable them one by one and check again, to find the problematic one.

如果是,则将它们一一启用并再次检查,以找到有问题的那个。

回答by Nasif Md. Tanjim

sudo apt-get -y --reinstall install phpmyadmin;
sudo service apache2 restart;

Hope this helps.

希望这可以帮助。

回答by Arun GK

I am using Linux Mint : After installing LAMP along with PhpMyAdmin, I linked both the configuration files of Apache and PhpMyAdmin. It did the trick. Following are the commands.

我正在使用 Linux Mint:在安装 LAMP 和 PhpMyAdmin 之后,我链接了 Apache 和 PhpMyAdmin 的配置文件。它做到了。以下是命令。

sudo ln -s /etc/phpmyadmin/apache.conf /etc/apache2/conf.d/phpmyadmin.conf

sudo /etc/init.d/apache2 reload

sudo /etc/init.d/apache2 reload