1.缺少msvcr110.dll文件,无法正常启动
打开页面:https://www.microsoft.com/en-us/download/details.aspx?id=30679
下载前面两个文件,安装修复,ok
卸载wamp,重新安装
2.橙色状态,端口占用
wamp默认端口号为80端口,更改端口:
.将httpd.conf中
#Listen 12.34.56.78:80
Listen 0.0.0.0:80
Listen [::0]:80
改成
.
#Listen 12.34.56.78:80
Listen 0.0.0.0:8090
Listen [::0]:8090
此时wamp启动的首页界面地址不再是localhost,而是localhost:8090
3.更改数据库
点击首页下面的phpmyadmin进入后台配置,点击数据库进行相关操作
4.更改数据库端口,
点击phpmyadmin,出现#1405报错,不能进入数据库
经过查找发现数据库端口被占用
解决办法:更改数据库端口:
(1)图标:mysql-->my.ini
将文件中默认的3306端口改成3307
(2)wamp\apps\phpmyadmin4.1.14\libraries下配置文件config.default.php。
$cfg['Servers'][$i]['port'] = ''
这句注释表明这里空表示使用的是MySQL的默认端口3306。只要把它改为:
$cfg['Servers'][$i]['port'] = '3307';
重启就好了
5.允许外网访问
打开..\wamp\bin\apache\apache2.4.9\conf\httpd.conf配置文件,
# AllowOverride controls what directives may be placed in .htaccess files.
# It can be "All", "None", or any combination of the keywords:
# AllowOverride FileInfo AuthConfig Limit
#
AllowOverride all
Require all granted #添加允许外部访问
#
# Controls who can get stuff from this server.
#
# onlineoffline tag - don‘t remove
# Require local #注释请求本机访问
</Directory>
6.php配置允许短标签
php.ini中
short_open_tag = Off ==> short_open_tag = On
7.配置默认跳转路径
想要打开localhost:8090 跳转到 localhost:8090/teamtoy(1).在www下新建welcome.php文件,写入代码
<?php
//重定向浏览器
header("Location: 10.25.37.164:8090/teamtoy");
//确保重定向后,后续代码不会被执行
exit;
?>
保存
(2).httpd.conf修改
DirectoryIndex index.php index.php3 index.html index.htm
==>
DirectoryIndex welcome.php index.php index.php3 index.html index.htm
以上几点本人亲测,希望有帮助!