XAMPP - 找不到对象!在任何文件/目录上
Posted
技术标签:
【中文标题】XAMPP - 找不到对象!在任何文件/目录上【英文标题】:XAMPP - Object not found! on any files/directories 【发布时间】:2014-06-04 05:45:53 【问题描述】:尝试在我的 Windows 7 机器上安装 XAMPP 时遇到问题。基本上,当我启动 apache 和 mysql 时,xampp 索引页面(localhost)工作正常。在我的本地文件目录中,我试过这个:
在: C:\xampp\htdocs 我创建了一个名为“test.php”的文件,然后在 Web 浏览器中我尝试了 localhost/test.php 我得到“找不到对象!”错误。
我尝试创建一个名为: C:\xampp\htdocs\oop 然后添加了一个索引文件: C:\xampp\htdocs\oop\index.php
并在 Web 浏览器中尝试了 'localhost/oop' 和 'localhost/oop/index.php' 但收到相同的错误。
我的错误日志是:
[Sat Apr 19 22:09:09.742135 2014] [ssl:warn] [pid 3508:tid 260] AH01909: www.example.com:443:0 server certificate does NOT include an ID which matches the server name
[Sat Apr 19 22:09:10.248164 2014] [ssl:warn] [pid 3508:tid 260] AH01909: www.example.com:443:0 server certificate does NOT include an ID which matches the server name
[Sat Apr 19 22:09:10.346169 2014] [mpm_winnt:notice] [pid 3508:tid 260] AH00455: Apache/2.4.9 (Win32) OpenSSL/0.9.8y PHP/5.4.27 configured -- resuming normal operations
[Sat Apr 19 22:09:10.346169 2014] [mpm_winnt:notice] [pid 3508:tid 260] AH00456: Apache Lounge VC10 Server built: Mar 17 2014 11:15:11
[Sat Apr 19 22:09:10.346169 2014] [core:notice] [pid 3508:tid 260] AH00094: Command line: 'c:\\xampp\\apache\\bin\\httpd.exe -d C:/xampp/apache'
[Sat Apr 19 22:09:10.365170 2014] [mpm_winnt:notice] [pid 3508:tid 260] AH00418: Parent: Created child process 2692
[Sat Apr 19 22:09:11.325225 2014] [ssl:warn] [pid 2692:tid 272] AH01909: www.example.com:443:0 server certificate does NOT include an ID which matches the server name
[Sat Apr 19 22:09:11.687246 2014] [ssl:warn] [pid 2692:tid 272] AH01909: www.example.com:443:0 server certificate does NOT include an ID which matches the server name
[Sat Apr 19 22:09:11.734249 2014] [mpm_winnt:notice] [pid 2692:tid 272] AH00354: Child: Starting 150 worker threads.
[Sat Apr 19 22:14:57.151005 2014] [ssl:warn] [pid 5348:tid 260] AH01909: www.example.com:443:0 server certificate does NOT include an ID which matches the server name
[Sat Apr 19 22:14:57.207008 2014] [core:warn] [pid 5348:tid 260] AH00098: pid file C:/xampp/apache/logs/httpd.pid overwritten -- Unclean shutdown of previous Apache run?
[Sat Apr 19 22:14:57.461023 2014] [ssl:warn] [pid 5348:tid 260] AH01909: www.example.com:443:0 server certificate does NOT include an ID which matches the server name
[Sat Apr 19 22:14:57.514026 2014] [mpm_winnt:notice] [pid 5348:tid 260] AH00455: Apache/2.4.9 (Win32) OpenSSL/0.9.8y PHP/5.4.27 configured -- resuming normal operations
[Sat Apr 19 22:14:57.514026 2014] [mpm_winnt:notice] [pid 5348:tid 260] AH00456: Apache Lounge VC10 Server built: Mar 17 2014 11:15:11
[Sat Apr 19 22:14:57.514026 2014] [core:notice] [pid 5348:tid 260] AH00094: Command line: 'c:\\xampp\\apache\\bin\\httpd.exe -d C:/xampp/apache'
[Sat Apr 19 22:14:57.517026 2014] [mpm_winnt:notice] [pid 5348:tid 260] AH00418: Parent: Created child process 2356
[Sat Apr 19 22:14:58.340073 2014] [ssl:warn] [pid 2356:tid 272] AH01909: www.example.com:443:0 server certificate does NOT include an ID which matches the server name
[Sat Apr 19 22:14:58.659092 2014] [ssl:warn] [pid 2356:tid 272] AH01909: www.example.com:443:0 server certificate does NOT include an ID which matches the server name
[Sat Apr 19 22:14:58.717095 2014] [mpm_winnt:notice] [pid 2356:tid 272] AH00354: Child: Starting 150 worker threads.
我尝试过的其他事情:
在 httpd.conf 文件中,我已将“Listen 80”更改为“Listen 1337”(Skype 也已关闭),但它没有解决任何问题。
我还查看了 Documentroot,看起来不错:
DocumentRoot "C:/xampp/htdocs"
<Directory "C:/xampp/htdocs">
我试过了:
DocumentRoot "C:\xampp\htdocs"
<Directory "C:\xampp\htdocs">
但同样的问题。
我是使用 XAMPP 和配置它的新手,非常感谢任何帮助。
谢谢。
【问题讨论】:
必须尝试重新安装 xampp 服务器?一些用户遇到了同样的问题bitnami community link 【参考方案1】:尝试将该 test.php 文件放在 htdocs 内的文件夹(例如 .demo)中,然后尝试浏览
http://localhost/demo/test.php
希望这会对你有所帮助。
【讨论】:
【参考方案2】:查看您的 /etc/httpd.conf 文件并检查您是否激活了虚拟主机。
我已激活它,请检查您的 etc/extra/httpd-vhosts.conf 文件。您可能已经设置了 VirtualHost。
【讨论】:
以上是关于XAMPP - 找不到对象!在任何文件/目录上的主要内容,如果未能解决你的问题,请参考以下文章
找不到对象!在此服务器上找不到请求的 URL。 PHP文件未被访问
在 Laravel - 使用 ubuntu 16.04 在 xampp 上找不到驱动程序
Codeigniter on xampp 错误:在此服务器上找不到请求的 URL