wampserver安装部署的一系列问题

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>

重启OK


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


以上几点本人亲测,希望有帮助!

评论
添加红包

请填写红包祝福语或标题

红包个数最小为10个

红包金额最低5元

当前余额3.43前往充值 >
需支付:10.00
成就一亿技术人!
领取后你会自动成为博主和红包主的粉丝 规则
hope_wisdom
发出的红包
实付
使用余额支付
点击重新获取
扫码支付
钱包余额 0

抵扣说明:

1.余额是钱包充值的虚拟货币,按照1:1的比例进行支付金额的抵扣。
2.余额无法直接购买下载,可以购买VIP、付费专栏及课程。

余额充值