用户名:  密码:   
您当前的位置:首页 > 

出现的错误

上次修改时间: 2022-12-03 10:30:57      来源:网络总结      作者:钢铁长陈
上一页      路径:DSD\WAMP相关\      下一页

1. 错误1:如果WAMP不能启动,(右下角显示黄色或红色的图标不能启动到绿色),C:\wamp\logs的错误日志不断增大,
 提示638或640错误,错误日志代码如下:
 [12-Jan-2015 13:55:19 Europe/Paris] PHP Stack trace:
 [12-Jan-2015 13:55:19 Europe/Paris] PHP   1. {main}() C:\wamp\scripts\refresh.php:0
 [12-Jan-2015 13:55:19 Europe/Paris] PHP   2. opendir() C:\wamp\scripts\refresh.php:638
 [12-Jan-2015 13:55:19 Europe/Paris] PHP Warning:  readdir() expects parameter 1 to be resource, boolean given in C:\wamp\scripts\refresh.php on line 640
 [12-Jan-2015 13:55:19 Europe/Paris] PHP Stack trace:
 [12-Jan-2015 13:55:19 Europe/Paris] PHP   1. {main}() C:\wamp\scripts\refresh.php:0
 [12-Jan-2015 13:55:19 Europe/Paris] PHP   2. readdir() C:\wamp\scripts\refresh.php:640
 [12-Jan-2015 13:55:19 Europe/Paris] PHP Warning:  readdir() expects parameter 1 to be resource, boolean given in C:\wamp\scripts\refresh.php on line 640

 我的原因是修改了如下的文件,使默认站点根目录指向了e:/360cloud/site/下的www目录,但我又把www改成www1,导致找不到站点根据而出错
 C:\wamp\bin\apache\apache2.4.9\conf\httpd.conf
 c:\wamp\wampmanager.ini
 C:\wamp\scripts\config.inc.php

 注:如果设置了开启网络访问设置了C:\wamp\bin\apache\apache2.4.9\conf\extra\httpd-vhosts.conf文件
 但要保证httpd-vhosts.conf中的第一个站点根目录指向和httpd.conf,wampmanager.ini,config.inc.php三个文件中站点根目录指向相同。

2. 错误2: 右下角显示黄色的图标不能启动到绿色
原因: ServerRoot "c:/wamp/bin/apache/apache2.4.9" 这里改为了ServerRoot "C:\wamp\www" 改回去即可

3. 错误3:改后重启右下角图标为黄色不能用, 原因: 使用复制修改没删除下面这行中的汉字注释
 DocumentRoot "C:\wamp\www"  //注:这里也要改 

4. 错误4:  本地用IP能访问,远程访问时提示: You don't have permission to access / on this server.
 原因1:是httpd-vhosts.conf中没加下面这段
  <Directory "C:\wamp\www">
  Options FollowSymLinks
  AllowOverride None
  Order deny,allow
  Require all granted
  </Directory>
 原因2: Win10 1909提示这个需要把httpd-vhosts.conf中的:DocumentRoot "c:/Apache24/docs/dummy-host.example.com"
  改为:DocumentRoot "C:\wamp\www"
 原因3: 网页根目录 "C:\wamp\www"下没有没有文件
 原因4:"C:\wamp\bin\apache\apache2.4.9\conf\httpd.conf"文件中的<Directory "c:/wamp/www/">改为<Directory "e:/ftp/site/w80/">即可


5. 错误5:打开自带的www目录下的index.php提示:Unable to open WampServer's config file, please change path in index.php file
 修改index.php文件里的$server_dir = "../";
 改成绝对地址修改index.php文件里的$server_dir = "../";
 改成绝对地址$server_dir = "C:/WAMP/";
 
6. 不管使用那个端口,都访问的是W80目录下网站,加端口号也不能访问其它目录,如W8082,W8083下站点
 原因:没有将#Include conf/extra/httpd-vhosts.conf这句前的#去掉