在WindowsXP下安装XAMPP,symfony

时间:2022-10-25 17:01:47



1.下载安装Xampp

http://www.apachefriends.org/en/xampp.html

2.       打开 “c:/XAMPP/apache/bin/php.ini”确认

        register_globals = Off

        magic_quotes_gpc = Off

        short_open_tag = On


3.       设置环境变量.


我的电脑->右键->属性->高级->环境变量->系统变量(第二个框框)

1.新建:变量名:PHP_HOME , 变量值: c:/XAMPP/php ,确定

2. 修改:双击path ,在变量值后面加上 ;%PHP_HOME%

确定保存


4. 开始运行,输入CMD

5. 输入 : pear channel-discover pear.symfony-project.com

6.       输入 : pear install symfony/symfony

7.       建立文件夹 c:/webs/askeet

8.       在命令行下输入 : cd c:/webs/askeet

9.       输入 : symfony init-project askeet

10.   输入 : symfony init-app frontend

11.   打开 « c:/xampp/apache/conf/httpd.conf« ,在文件末尾添加

  Allow from All

 

  ServerName askeet

  DocumentRoot "c:/webs/askeet/web"

  DirectoryIndex index.php

  Alias /sf "c:/xampp/php/pear/data/symfony/web/sf"

 

 

   AllowOverride All

   Allow from All

 

 

12.   打开 « c:/WINDOWS/system32/drivers/etc/hosts« ,在文件末尾添加

127.0.0.1       askeet

13.   打开 IE 或Firefox输入 : http://askeet


如果看到:




Congratulations! You have successfully created your symfony project.
Symfony Project Created

Project setup successful
    This project uses the symfony libraries. If you see no image in this page, you may need to configure your web server so that it gains access to the symfony_data/web/sf/ directory.
This is a temporary page
    This page is part of the symfony default module. It will disappear as soon as you define a homepage route in your routing.yml.
What's next

        * Create your data model
        * Customize the layout of the generated templates
        * Learn more from the online documentation


说明安装成功

如果是看到消息

Access forbidden!

在命令行下输入

>cd c:/webs/askeet

>symfony fix-perms