Warning: file_get_contents(/data/phpspider/zhask/data//catemap/6/apache/8.json): failed to open stream: No such file or directory in /data/phpspider/zhask/libs/function.php on line 167

Warning: Invalid argument supplied for foreach() in /data/phpspider/zhask/libs/tag.function.php on line 1116

Notice: Undefined index: in /data/phpspider/zhask/libs/function.php on line 180

Warning: array_chunk() expects parameter 1 to be array, null given in /data/phpspider/zhask/libs/function.php on line 181
Php xampp Windows 8.1(20023)给定路径位于根路径之上_Php_Apache_Permissions_Xampp_Windows 8.1 - Fatal编程技术网

Php xampp Windows 8.1(20023)给定路径位于根路径之上

Php xampp Windows 8.1(20023)给定路径位于根路径之上,php,apache,permissions,xampp,windows-8.1,Php,Apache,Permissions,Xampp,Windows 8.1,Windows版本:Windows 8 Pro 64位 XAMPP版本:5.5.19 我刚刚将XAMPP上的本地系统从Windows XP机器移动到Windows 8.1。 如果我浏览到http://localhost/w/index.php/Home,“/Home”被传递到文件,该文件将其等同于“?title=Home”,但在新系统上,浏览器显示: Access forbidden! You don't have permission to access the requested obje

Windows版本:Windows 8 Pro 64位 XAMPP版本:5.5.19

我刚刚将XAMPP上的本地系统从Windows XP机器移动到Windows 8.1。 如果我浏览到
http://localhost/w/index.php/Home
,“/Home”被传递到文件,该文件将其等同于“?title=Home”,但在新系统上,浏览器显示:

Access forbidden!

You don't have permission to access the requested object. It is either read-protected or not readable by the server.

If you think this is a server error, please contact the webmaster.

Error 403
localhost
Apache/2.4.10 (Win32) OpenSSL/1.0.1i PHP/5.5.19 
在Apache(error.log)中,我看到:

“/Home”不是文件,应该传递给index.php

谢谢你的帮助;我对.conf文件不够熟悉,无法理解导致错误的原因

编辑(回复Rhythem Aggarwal):

直接访问localhost/也会禁止
访问。和
[core:error][pid 3408:tid 1732](20023)给定路径位于根路径:[client::1:52491]AH00127:无法将GET/HTTP/1.1映射到文件

在进入
http://localhost/w/index.php?title=Home
工作正常

我尝试添加到httpd-xampp.conf:


选项索引跟随符号链接多视图
允许超越所有
命令拒绝,允许
通融
要求所有授权

根据另一个答案,但没有任何变化

编辑更多内容以显示XAMPP显示:

Initializing Control Panel
18:00:36  [main]    Windows Version: Windows 8 Pro  64-bit
18:00:36  [main]    XAMPP Version: 5.5.19
18:00:36  [main]    Control Panel Version: 3.2.1  [ Compiled: May 7th 2013 ]
18:00:36  [main]    Running with Administrator rights - good!
18:00:36  [main]    XAMPP Installation Directory: "c:\xampp\"
18:00:36  [main]    Checking for prerequisites
18:00:36  [main]    All prerequisites found
18:00:36  [main]    Initializing Modules
18:00:36  [main]    Enabling autostart for module "Apache"
18:00:36  [main]    Enabling autostart for module "MySQL"
18:00:36  [main]    Starting Check-Timer
18:00:36  [main]    Control Panel Ready
18:00:36  [Apache]  Autostart active: starting...
18:00:36  [Apache]  Attempting to start Apache app...
18:00:36  [mysql]   Autostart active: starting...
18:00:36  [mysql]   Attempting to start MySQL app...
18:00:37  [Apache]  Status change detected: running
18:00:37  [mysql]   Status change detected: running
18:09:27  [Apache]  Attempting to stop Apache (PID: 2928)
18:09:27  [Apache]  Attempting to stop Apache (PID: 2432)
18:09:28  [Apache]  Status change detected: stopped
18:09:31  [Apache]  Attempting to start Apache app...
18:09:31  [Apache]  Status change detected: running
另一编辑:

当我在Windows 8.1文件管理器中查看c:\xampp\htdocs的属性时,它会显示已选中的只读框,即使我取消选中它,然后允许它更新所有文件和子文件夹,当我再次查看属性时,它会显示为只读。

从我的理解来看, php是一个通常位于htdocs文件夹中的文件。此文件(未更改时,即新安装的xampp中的文件)会将您重定向到xampp主屏幕。 1.你试着键入我提到的链接了吗? 2.如果是,那么这通常是Xampp更改的安全策略的一种情况,假设在升级到windows 8.1时,您也将Xampp升级到了更新的版本

请按照这个链接,以防你在我提到的第二步


如果这些都不适合你,请告诉我

答案似乎是我在htdocs文件夹中有一个旧的实验.htaccess文件。在Windows XP下,该文件显然被忽略,但现在在Windows 8.1上,它被使用并干扰

eth已经说过了:答案似乎是我在htdocs文件夹中有一个旧的实验.htaccess文件。在Windows XP下,该文件显然被忽略,但现在在Windows 8.1上,它被使用并干扰

尝试下面的代码,将其添加到您的
httpd xampp.conf
文件中:

<Directory "C:/xampp/htdocs/">
        Options Indexes FollowSymLinks MultiViews
        AllowOverride all
        Order Deny,Allow
        Allow from all
        Require all granted
</Directory>

选项索引跟随符号链接多视图
允许超越所有
命令拒绝,允许
通融
要求所有授权

希望这对你有帮助。(感谢。)

尝试直接在浏览器中浏览localhost/(对于步骤1,我的坏消息忘记了链接)您能在这里添加一个屏幕截图吗?apache和web浏览器???一个简单的问题,您是否在更改conf文件后尝试重新启动xampp服务器?如果不重新启动,新代码将不会生效。谢谢。是的,每次更改后我都重新启动Apache。但是我能在截图中显示什么,比我在文本中写的更多呢?(我更容易在这里粘贴文本)好的,给我几秒钟时间,用我的配置来解决这个问题。
<Directory "C:/xampp/htdocs/">
        Options Indexes FollowSymLinks MultiViews
        AllowOverride all
        Order Deny,Allow
        Allow from all
        Require all granted
</Directory>