推荐使用XAMPP的基础上安装symfony
By Johnny Deng
1)首先确保XAMPP下的pear安装正确
在xamPp安装目录下命令行执行:pear list
出现类似如下输出,表示pear已经安装:
INSTALLED PACKAGES, CHANNEL PEAR.PHP.NET:
=========================================
PACKAGE VERSION STATE
Archive_Tar 1.3.1 stable
Console_Getopt 1.2 stable
PEAR 1.4.11 stable
注意:请确保双击xampp/php/PEAR_ENV.reg,把pear的设置添加到系统注册表中,如果没有此文件,双击同一目录下的peardev.bat,会生成此reg文件,如果没有此文件产生,请重新安装一下pear
否则,请参考如下链接,在XAmpp中先安装pear:
http://www.blog.edu.cn/user2/54816/archives/2006/1594104.shtml
2)安装 symfony,方法:
C:/path_to_xampp/php>pear channel-discover pear.symfony-project.com
Adding Channel "pear.symfony-project.com" succeeded
Discovery of channel "pear.symfony-project.com" succeeded
C:/Program Files/xampp/php>pear install symfony/symfony-beta
downloading symfony-1.0.0beta2.tgz …
Starting to download symfony-1.0.0beta2.tgz (1,632,555 bytes)
………………………………………..done: 1,632,555 bytes
install ok: channel://pear.symfony-project.com/symfony-1.0.0beta2
安装完后,在命令行下输入:
symfony -V
symfony version 1.0.10
表示安装正确
注意:请确保系统path里包括(我这里xampp安装目录为c:/xampp) C:/xampp/php;c:/xampp;C:/xampp/php/ext