гүйдэг Тitle

Sunday, February 19, 2012

Symfony 1.4.16 - Windows 7 дээр суулгах

How to install symfony WampServer Version 2.2a
Fixed for WampServer Version 2.2a
1. Install WAMP
[WampServer Version 2.2a]
2. Install PEAR
#Press the Win key
#Type cmd
#Press Ctrl+Shift+Enter
#Confirm the elevation prompt
#cd [ wamp on php directory {C:/wamp/bin/php/phpХ.Х.Х}]
#php -d phar.require_hash=0 PEAR/go-pear.phar
[if not found go-pear.phar file. Download from this URL http://pear.php.net/go-pear.phar,
Save to
C:/wamp/bin/php/phpХ.Х.Х/PEAR/go-pear.phar]
#use, double click PEAR_ENV.reg


3. Install Symfony
# Press the Win key
# Type cmd
# Press Ctrl+Shift+Enter
# Confirm the elevation prompt
# cd [ wamp on php directory ]
# pear upgrade PEAR
1. Note: You will get a pop-up with “CLI has stopped working”, you can safely close that (this will happen during the other command prompt steps as well).
# pear channel-discover pear.symfony-project.com
# pear install symfony/symfony-1.4.16

4. Setup Your Application
Add symfony to your path:
1. Start Orb -> Computer (right click and choose properties)
2. Advanced system settings
3. Environment Variables…
4. Click on the Path System variable and click edit
5. At the end of the string, append ;[
C:/wamp/bin/php/phpХ.Х.Х;C:/wamp/bin/mysql/mysqlХ.Х.Х/bin]

Restart the command prompt for the path variable to set.

Set up a sample project:
1. cd [path to your workspace]
2. mkdir [ project name ]
3. cd [ project name ]
4. symfony generate:project [ project name ]
5. symfony generate:app frontend <- [ First app name ]

5. Configure the Web Server

Set up a named host:
1. Go to C:/Windows/System32/drivers/etc in explorer and right click on the host file. Uncheck the read only box.
2. Hit the windows key
3. Type notepad.exe
4. Cntrl+Shift+Enter
5. File -> Open
6. Open C:/Windows/System32/drivers/etc (you will have to put an * in the file name box to see the file) and open the hosts file
7. Add “127.0.0.1 [ project url ]” under “127.0.0.1 localhost” (without the quotes)
8. Save
9. Go to C:/Windows/System32/drivers/etc in explorer and right click on the host file. Check the read only box.
10. File -> Open
11. [conf/httpd.conf file on Apache/WAMP]
find word a vhost, When
uncomment two line from your find result.
...
. #LoadModule vhost_alias_module modules/mod_vhost_alias.so
...
. #Include conf/extra/httpd-vhosts.conf
...
12. File -> Open
13. [conf/extra dir on Apache/WAMP] (you will have to put an * in the file name box to see the file) and open httpd-vhosts.conf
14. Add this to the end of the httpd-vhosts.conf file and save:

15. Uncomment ##NameVirtualHost *:80 if you want to have more than one project able to run with different names.
16. Restart Apache and go to http://[project name] and you should see the symfony default project page.

6. Setup File Folder Permissions
Now you need to allow for write access to the cache and log folder.
1. Traverse to each those two directories seperately within your newly Symfony file structure with Explorer.
2. Right click on each of the folders and choose properties
3. Go to the security tab and choose the user that will be granted the permissions and click edit.
a. Note: You can find out the user by Ctrl+Alt+Delete, and then starting the task manager. Note the User Name.
4. Allow that person to have full control.

7. Apache ReWrite module active.
a. Click rewrite module in WAMP->Apache->Apache modules->rewrite_module.

8. Apache ReWrite module active.
a. Click rewrite module in WAMP->Apache->Apache modules->vhost_alias_module.
b. Apache[WAMP]/conf/http.conf uncomment [#Include conf/extra/httpd-vhosts.conf]

эх сурвалж http://symfony.blog.gogo.mn

1 comment:

  1. Ankhaarakh zuil

    wamp 2.1 suulgakh

    pear install Structures_Graph-1.0.4

    pear defualt tokhirgoo:

    pear config-set http_proxy ""

    ReplyDelete