Warning: file_get_contents(/data/phpspider/zhask/data//catemap/6/apache/9.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 错误404。xampp htdocs在本地访问中出现问题_Php_Apache_Ubuntu_Xampp - Fatal编程技术网

Php 错误404。xampp htdocs在本地访问中出现问题

Php 错误404。xampp htdocs在本地访问中出现问题,php,apache,ubuntu,xampp,Php,Apache,Ubuntu,Xampp,我是PHP新手 我使用以下命令在Ubuntu 12.04 LTS上下载并安装xampp-linux-1.7.3a.tar.gz文件: tar xvfz xampp-linux-1.7.3a.tar.gz -C /opt sudo chmod 777 -R /opt/lampp/htdocs/ sudo /opt/lampp/lampp security 使用此命令解决了htdocs问题: tar xvfz xampp-linux-1.7.3a.tar.gz -C /opt su

我是PHP新手

我使用以下命令在Ubuntu 12.04 LTS上下载并安装xampp-linux-1.7.3a.tar.gz文件:

 tar xvfz xampp-linux-1.7.3a.tar.gz -C /opt
 sudo chmod 777 -R /opt/lampp/htdocs/
 sudo /opt/lampp/lampp security
使用此命令解决了htdocs问题:

 tar xvfz xampp-linux-1.7.3a.tar.gz -C /opt
 sudo chmod 777 -R /opt/lampp/htdocs/
 sudo /opt/lampp/lampp security
并使用此命令设置密码:

 tar xvfz xampp-linux-1.7.3a.tar.gz -C /opt
 sudo chmod 777 -R /opt/lampp/htdocs/
 sudo /opt/lampp/lampp security
在我的浏览器中,我转到本地主机地址,一切正常。但当我浏览位于htdocs文件夹(newsite)中的站点时,会出现以下错误:

 Object not found!  

 The requested URL was not found on this server. If you entered the URL manually please check your spelling and try again.  

 If you think this is a server error, please contact the webmaster.  
 Error 404  
 localhost  
 Sun 22 Jul 2012 11:38:05 AM IRDT  
 Apache/2.2.21 (Unix) DAV/2 mod_ssl/2.2.21 OpenSSL/1.0.0c PHP/5.3.8 mod_apreq2-20090110/2.7.1 mod_perl/2.0.5 Perl/v5.10.1    

我在网上搜索了很多次,但没有解决这个问题。

在添加mysite后,您是否
chmod
了htdocs文件夹?再次运行
chmod
命令,然后重新启动Apache。

tanx m1ket。首先,我对/opt/lampp/lampp文件中的一些行进行注释,但再次启用此注释,然后安装ia32 libs并运行chmod命令,并根据上面的注释重新启动lampp。现在一切都好了。任何人都可以。