从wamp到xampp的升级之路

yipeiwu_com6年前PHP代码库

准备学习php框架Laravel,但PHP版本要求5.4+,目前用的wamp默认版本5.3,所以准备使用xampp,以下为记录

卸载wamp,略过
> ps:注意卸载wamp会删除PHP目前下的文件,因为PHP的扩展redis,memcache也会删除,记得备份,也可重下版本,还有MySQL数据库也记得备份

https://www.apachefriends.org/zh_cn/index.html点此下载软件

启动Apache,MySQL,打开localhost成功安装

配置,因为xampp默认根目录有新的www,因此需要为原来的wamp的www目录配置虚拟域名
编辑httpd.conf ,修改

<Directory />
  #AllowOverride none
  #Require all denied
  Options All
  AllowOverride All
  Order deny,allow
  Allow from all
</Directory>

编辑httpd-vhosts.conf

NameVirtualHost *:80
<VirtualHost *:80>
  ServerAdmin webmaster@dummy-host.example.com
  DocumentRoot "D:/soft/xampp/htdocs"
  ServerName localhost
</VirtualHost>
<VirtualHost *:80>
  ServerAdmin webmaster@dummy-host.example.com
  DocumentRoot "D:/soft/wamp/www"
  ServerName vhallapp.com
  ServerAlias www.vhallapp.com
  ErrorLog "D:/soft/wamp/apacheerror.log"
  CustomLog "D:/soft/wamp/apacheaccess.log" common
</VirtualHost>

编辑hosts

复制代码 代码如下:

127.0.0.1 www.app.com

5. 下载redis

复制代码 代码如下:

6. 编辑php.ini

复制代码 代码如下:

extension=php_redis.dll

7. 打开xdebug

[XDebug]
zend_extension = "D:\soft\xampp\php\ext\php_xdebug.dll"
xdebug.profiler_append = 0
xdebug.profiler_enable = 1
xdebug.profiler_enable_trigger = 0
xdebug.profiler_output_dir = "D:\soft\xampp\tmp"
xdebug.profiler_output_name = "cachegrind.out.%t-%s"
xdebug.remote_enable = 0
xdebug.remote_handler = "dbgp"
xdebug.remote_host = "127.0.0.1"
xdebug.trace_output_dir = "D:\soft\xampp\tmp"

8.打开www.app.com
over

以上所述就是本文的全部内容了,希望能够对大家熟悉配置XAMPP有所帮助。

相关文章

基于php实现长连接的方法与注意事项的问题

php可以通过set_time_limit(0);来取消php脚步超时限制,从而达到长连接的效果。 例子代码如下:复制代码 代码如下:<?php echo "每隔3秒输出一次<...

PHP使用strtotime计算两个给定日期之间天数的方法

本文实例讲述了PHP使用strtotime计算两个给定日期之间天数的方法。分享给大家供大家参考。具体分析如下: PHP的strtotime函数用于将任何英文文本的日期时间描述解析为Uni...

WordPress开发中短代码的实现及相关函数使用技巧

其实实现短代码很简单,我们只需要用到 WordPress 里面的一个函数就可以搞定短代码,外加自己的一个小函数,可以让短代码实现的轻松加愉快。 短代码实现原理 就像往 WP 一些动作里加...

统计PHP目录中的文件数方法

代码示例如下: <?php $folderPath = "upload/"; $countFile = 0; $totalFiles = glob($folderPat...

PHP 清空varnish 缓存的详解(包括指定站点下的)

没法清空文件夹内容 只能清空指定链接缓存复制代码 代码如下:<?phpfunction clearVarnish($ip,$url,$host=null){  ...