php EasyPHP 无法连接到本地主机

声明:本页面是StackOverFlow热门问题的中英对照翻译,遵循CC BY-SA 4.0协议,如果您需要使用它,必须同样遵循CC BY-SA许可,注明原文地址和作者信息,同时你必须将它归于原作者(不是我):StackOverFlow 原文地址: http://stackoverflow.com/questions/12991102/
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-25 04:35:46  来源:igfitidea点击:

EasyPHP Cannot Connect to Localhost

phplocalhosteasyphp

提问by user12893298320392

I have had EasyPHP running on my system, but had to do a clean OS reinstall. Just downloaded and installed EasyPHP again, and Apache is running. But when I try to access the administrative page (127.0.0.1/home) through my web browser I get a "Oops! Google Chrome could not connect to 127.0.0.1" error.

我的系统上运行了 EasyPHP,但必须重新安装干净的操作系统。刚刚再次下载并安装了 EasyPHP,Apache 正在运行。但是,当我尝试通过网络浏览器访问管理页面 (127.0.0.1/home) 时,出现“糟糕!Google Chrome 无法连接到 127.0.0.1”错误。

I checked Apache's httpd file and it says it is listening on 127.0.0.1:80, which is exactly how I am trying to access the admin page through the browser. For some reason howver I am able to access the www folder with 127.0.0.1:8887.

我检查了 Apache 的 httpd 文件,它说它正在侦听 127.0.0.1:80,这正是我试图通过浏览器访问管理页面的方式。出于某种原因,我可以使用 127.0.0.1:8887 访问 www 文件夹。

I'm not very knowledgeable on EasyPHP so any help would be appreciated.

我对 EasyPHP 不是很了解,所以任何帮助将不胜感激。

回答by Jay Wick

I had the same issue which was resolved by running the EasyPHP executable with admin privileges.

我遇到了同样的问题,通过以管理员权限运行 EasyPHP 可执行文件解决了这个问题。

Update:I avoid installing EasyPHP into the Program Filesfolder and never had this issue again.

更新:我避免将 EasyPHP 安装到Program Files文件夹中,并且再也没有出现过这个问题。

回答by Warrex

I was able to fix this problem by changing the listening port to 8887 like you did, but instead of saving it, do a 'Save As' and then overwrite it. It will ask you if you wish to overwrite the file, and just press 'yes'. This made the change permanent. Whenever I just saved it normally by pressing 'Save' instead of 'Save As', it would just create a new httpd file with the timestamp and not overwrite the original, which doesn't work.

我能够像您一样通过将侦听端口更改为 8887 来解决此问题,但不是保存它,而是执行“另存为”然后覆盖它。它会询问您是否要覆盖该文件,只需按“是”即可。这使更改成为永久性的。每当我通过按“保存”而不是“另存为”来正常保存它时,它只会创建一个带有时间戳的新 httpd 文件,而不是覆盖原始文件,这是行不通的。

回答by Balbuzar

Did you check apache error logs ?

您是否检查了 apache 错误日志?

In your easyphp toolbar you can see if apache is running (green icon)

在您的 easyphp 工具栏中,您可以查看 apache 是否正在运行(绿色图标)

By the way, try this command "netstat -b" and try to find "apache.exe" ( or "httpd.exe" depending of your easyphp version) listening on port 80.

顺便说一句,试试这个命令“netstat -b”并尝试找到“apache.exe”(或“httpd.exe”,取决于你的easyphp版本)监听端口80。

But first, check your apache error logs, maybe there is a failure on your apache configuration files.

但首先,请检查您的 apache 错误日志,也许您的 apache 配置文件出现故障。

回答by Wesley Ricardo Silva

I had the same trouble today and when i tried to fix this changing the port by the EasyPHP program, this didn't resolve. If this occur try go to folder of the program/apache/confand manually change httpd.conf. Here the httpdof the program folder indicates 127.0.0.1:80while httpdconf apache folder show 127.0.0.1:8887.

我今天遇到了同样的问题,当我尝试通过 EasyPHP 程序更改端口来解决这个问题时,这没有解决。如果发生这种情况,请尝试转到 的文件夹program/apache/conf并手动更改httpd.conf。这里的httpd程序文件夹表示,127.0.0.1:80httpdconf apache文件夹显示127.0.0.1:8887.

I hope had helped yours. Regards

我希望对你有帮助。问候