在Windows7 X64 上安装Tiny Issue

  • Post author:
  • Post category:Web
  • Post comments:0评论

安装准备:
Windows 7 X64
PHP Version 5.5.6 (Win64)
http://windows.php.net/download/#php-5.5-ts-VC11-x64
VC11 x64 Thread Safe
Apache/2.4.7 (Win64)
http://www.apachelounge.com/download/
httpd-2.4.7-win64-VC11.zip
MySQL
tinyissue

一、Apache安装配置

1.解压httpd-2.4.7-win64-VC11.zip 到 D:\Dev\Apache24并创建 D:\www 目录

2.修改配置文件httpd.conf
(1)ServerRoot “c:/Apache24” 改为 ServerRoot “D:/Apache24”; //Apache程序的位置。
(2)ServerName 前面的“#”号去掉;
(3)DocumentRoot “c:/Apache24/htdocs” 改为DocumentRoot “D:/www”; //网站的根目录
(4)<Directory “c:/Apache24/htdocs”> 改为<Directory ” D:/www “>;
(5)DirectoryIndex index.html 改为DirectoryIndex index.html index.php index.htm //支持更多的默认页
(6)ScriptAlias /cgi-bin/ “c:/Apache24/cgi-bin/” 改为ScriptAlias /cgi-bin/ “d:/dev/Apache24/cgi-bin/”
(7)<Directory “c:/Apache24/cgi-bin”> 改为<Directory “D:/Apache24/cgi-bin”>

3.安装服务

httpd.exe -k install -n "Apache Server 2.4"

在services.msc中找到服务并开启服务。

4.测试Apache服务器
访问 http://localhost/
出现It works!表明安装基本正常

二、PHP安装设置

1.解压php-5.5.6-Win32-VC11-x64.zip到D:\Dev\PHP

2.复制份php.ini-development,并改名为PHP.ini。

3.打开Apache24下httpd.conf,在最后加上

# php5 support
LoadModule php5_module "D:/Dev/PHP/php5apache2_4.dll"
AddHandler application/x-httpd-php .php
# configure the path to php.ini
PHPIniDir "D:/Dev/PHP/"

php5apache2_4.dll使用php-5.5.6-Win32-VC11-x64.zip中自带的即可。

4. 重启 Apache 服务器。

5.在www目录下新建一个index.php,内容为<?php phpinfo(); ?>
访问http://localhost/index.php
出现php的信息就说明php已经成功安装。

三、MYSQL安装

1.从http://dev.mysql.com/downloads/mysql/
下载64位社区版本的MYSQL。

2.打开MYSQL Workbench,添加新用户tinyissue,和新数据库tinyissue-db

3.配置PHP.ini识别MYSQL
(1)extension_dir = “ext”,去掉前面的“;”,并改为
extension_dir =”D:\Dev\PHP\ext”
(2)添加如下两行
extension=php_mysql.dll
extension=php_mysqli.dll
重启Apache服务(通过services.msc)

四、安装tinyissue

1. 下载tinyissue,解压到D:\www\tinyissue

2. 修复与PHP5.5.6兼容问题
yield在高级版本中变成了关键字,不能将自定义函数命名为yield。
(1)找到Section.php,修改

public static function yield()
{
return static::yield(static::stop());
}

public static function yield_section()
{
return static::sections_yield(static::stop());
}

(2)找到helper.php,修改

function yield($section)
{
    return Laravel\Section::yield($section);
}

function helper_yield($section)
{
    return Laravel\Section::sections_yield($section);
}

3.配置Apache,修改httpd.conf,增加

<Directory "E:/www/tinyissue">
    AllowOverride None
    Options None
    Order allow,deny
    Allow from all
    Options Indexes MultiViews ExecCGI FollowSymLinks
    DirectoryIndex index.php
</Directory>

4.访问http://localhost/tinyissue/install/进行安装

5.OK~

继续阅读在Windows7 X64 上安装Tiny Issue

Win7下本地Apache与PHP环境的搭建

  • Post author:
  • Post category:Web
  • Post comments:0评论

今天本来想搭建一个本地的wordpress测试环境,本着“自己动手,丰衣足食”的精神,决定自己配置Apache和PHP。没想到这是一场噩梦的开始。其中的曲折就不说了,折腾了一天,不仅没有安装成功,而且连错误的原因也没弄得很清楚,相当郁闷。在这里大致列出一下问题,希望不幸遇到的同学能少走点弯路。

操作系统:Windows7简体中文版
Apache版本:2.2.14 & 2.2.4
PHP版本: 5.2.13 & 5.3.1
问题症状:正确安装Apache和PHP后,修改Apache的配置文件httpd.conf。加入

LoadModule php5_module "D:/Dev/WAMP/bin/php/php5.3.0/php5apache2_2.dll"

之后重启Apache服务器,发现无法启动。

可选解决方案:使用WAMP(WAMP在windows7下面表现良好)。

当然,如果有同学重现并解决问题,希望能通告一声,万分感谢。

继续阅读Win7下本地Apache与PHP环境的搭建