php Xampp:Web 浏览器不会显示本地主机页面
声明:本页面是StackOverFlow热门问题的中英对照翻译,遵循CC BY-SA 4.0协议,如果您需要使用它,必须同样遵循CC BY-SA许可,注明原文地址和作者信息,同时你必须将它归于原作者(不是我):StackOverFlow
原文地址: http://stackoverflow.com/questions/11020804/
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
Xampp: web browser won't show the localhost page
提问by AnonymousCoder
I have installed xampp on Windows7(64bit).I want to work with PHP, Apache and MySql. The server Apache and the MySql services are running properly on the Xampp control panel. But when I run the localhost on my web browser it just shows connecting. Nothing else. Compare to previous enviroment it runs well with IIS.
我已经在 Windows7(64 位)上安装了 xampp。我想使用 PHP、Apache 和 MySql。服务器 Apache 和 MySql 服务在 Xampp 控制面板上正常运行。但是当我在我的网络浏览器上运行本地主机时,它只显示连接。没有其他的。与以前的环境相比,它与 IIS 运行良好。
采纳答案by user1092042
Try doing a netstat -a on your cmd and see if there are any other services which are running on port 80.You can also use netstat -b to find the name of the service however this requires cmd to be run as administrator. The most likely culprit is that there are some other services running on this port which do not allow Xampp to start up properly? Do you have a service like skype . If so that is the reason your not able to access particular page. An other thing you can do is to go into httpd.conf and change the listen to some other port other than 80 and test it out.Dont forget to add localhost:your selected portonce you change the port to test it out.
尝试在您的 cmd 上执行 netstat -a 并查看是否有任何其他服务在端口 80 上运行。您也可以使用 netstat -b 来查找服务的名称,但这需要以管理员身份运行 cmd。最有可能的罪魁祸首是该端口上运行了一些其他服务,这些服务不允许 Xampp 正常启动?你有像Skype这样的服务吗?如果是这样,这就是您无法访问特定页面的原因。您可以做的另一件事是进入httpd.conf 并将监听更改为80 以外的其他端口并进行测试。localhost:your selected port更改端口后不要忘记添加以进行测试。
回答by Dhanraj Kotian
If you changed your port number, then type localhost:'port number' to get to the xampp page.
如果您更改了端口号,则键入 localhost:'port number' 以进入 xampp 页面。
ex: If your port number is 8080, then type localhost:8080.
例如:如果您的端口号是 8080,则输入localhost:8080.
回答by user1226868
Its possible that IIS or any other program (like Skype) causes Apache not to start. Although it shows "running" its actually not running.
IIS 或任何其他程序(如 Skype)可能导致 Apache 无法启动。尽管它显示“正在运行”,但实际上并未运行。
To solve this, there is an easy trick: Install Apache as an service and restart your computer. This wil work most of the time, since there are a lot of programs that reserve port 80 its hard to find these programs and disable them.
要解决这个问题,有一个简单的技巧:将 Apache 安装为服务并重新启动计算机。这在大多数情况下都有效,因为有很多程序保留了端口 80,因此很难找到这些程序并禁用它们。
回答by Ankit
If you changed your apache listining port from 80 to 8080 ,then . . . write localhost:8080/your_URL ... it will work :)
如果您将 apache 列表端口从 80 更改为 8080,那么 . . . 写 localhost:8080/your_URL ...它会工作:)
回答by smix
if it's not the port, then go to htdocs, delete dashboard file and index file and you are good to go! :)
如果不是端口,则转到 htdocs,删除仪表板文件和索引文件,就可以了!:)
回答by user3819583
If you have following errors: [Wed Jun 10 10:32:13.697671 2015] [core:warn] [pid 1408:tid 248] AH00098: pid file C:/xampp/apache/logs/httpd.pid overwritten -- Unclean shutdown of previous Apache run? Failed loading /usr/local/lib/php/extensions/no-debug-zts-20060613/usr/local/Zend/lib/ZendExtensionManager.sote does NOT include an ID which matches the server name
如果您有以下错误: [Wed Jun 10 10:32:13.697671 2015] [core:warn] [pid 1408:tid 248] AH00098: pid file C:/xampp/apache/logs/httpd.pid overwritten -- Unclean shutdown以前的Apache运行?加载失败 /usr/local/lib/php/extensions/no-debug-zts-20060613/usr/local/Zend/lib/ZendExtensionManager.sote 不包含与服务器名称匹配的 ID
which i am extracted from Apache Error log file.
我是从 Apache 错误日志文件中提取的。
Then you need check for running process of apache, you can do command also or you can do using GUI. I am explaining GUI method, open task manager(using ctrl+shift+esc) and go into process list and be assure that all the processes are visible including other logged in users. And search for Apache process and end them . You are done run it using XAmpp or wamp control panel.
然后你需要检查apache的运行过程,你也可以做命令或者你可以使用GUI来做。我正在解释 GUI 方法,打开任务管理器(使用 ctrl+shift+esc)并进入进程列表并确保所有进程都可见,包括其他登录用户。并搜索 Apache 进程并结束它们。您已完成使用 XAmpp 或 wamp 控制面板运行它。

