0. edytujemy /etc/apache2/sites-enabled/001-mathforum
sudo nano /etc/apache2/sites-enabled/001-mathforum
i wpisujemy tam coś takiego:
<VirtualHost *:6060> ServerName projekt DocumentRoot "/home/michal/workspace/mathforum/web" DirectoryIndex index.php Alias /sf /home/michal/workspace/mathforum/lib/vendor/symfony/data/web/sf <Directory "/home/michal/workspace/mathforum/lib/vendor/symfony/data/web/sf"> AllowOverride None Order allow,deny Allow from All </Directory> <Directory "/home/michal/workspace/mathforum/web"> AllowOverride All </Directory> </VirtualHost>
Zapisujemy plik i restartujemy serwer
sudo /etc/init.d/apache2 restart
1. ściągamy http://www.symfony-project.org/get/symfony-1.2.8.zip
2. cd ~/workspace/mathforum
3. mkdir -p lib/vendor
4. cd lib/vendor
5. rozpakowujemy symfony-1.2.8.zip do lib/vendor i zmianiamy nazwę katalogu z "symfony-1.2.8" na "symfony"
6. cd ~/workspace/mathforum
7. wywołujemy http://localhost:6060/lib/vendor/symfony/data/bin/check_configuration.php
U mnie pojawiło się coś takiego:
******************************** * * * symfony requirements check * * * ******************************** php.ini used by PHP: /etc/php5/apache2/php.ini ** Mandatory requirements ** OK PHP version is at least 5.2.4 OK php.ini has zend.ze1_compatibility_mode set to off ** Optional checks ** OK PDO is installed [[WARNING]] PDO has some drivers installed: : FAILED *** Install PDO drivers (mandatory for Propel and Doctrine) *** OK PHP-XML module is installed [[WARNING]] XSL module is installed: FAILED *** Install the XSL module (recommended for Propel) *** OK The token_get_all() function is available OK The mb_strlen() function is available OK The iconv() function is available OK The utf8_decode() is available [[WARNING]] A PHP accelerator is installed: FAILED *** Install a PHP accelerator like APC (highly recommended) *** [[WARNING]] php.ini has short_open_tag set to off: FAILED *** Set it to off in php.ini *** [[WARNING]] php.ini has magic_quotes_gpc set to off: FAILED *** Set it to off in php.ini *** OK php.ini has register_globals set to off OK php.ini has session.auto_start set to off OK PHP version is not 5.2.9
Naprawiamy to co trzeba:
a) [[WARNING]] PDO has some drivers installed: : FAILED
sudo apt-get install php5-dev sudo apt-get install mysql-server-5.1 sudo apt-get install libmysqlclient15-dev sudo pecl install pdo
Edytujemy /etc/php5/apache2/php.ini
sudo nano /etc/php5/apache2/php.ini
i dodajemy tam dwie linijki do sekcji "Dynamic Extensions":
extension=pdo.so extension=pdo_mysql.so
b) [[WARNING]] XSL module is installed: FAILED
sudo apt-get install php5-xsl
c) [[WARNING]] A PHP accelerator is installed: FAILED
sudo apt-get install php-apc
d) [[WARNING]] php.ini has short_open_tag set to off: FAILED
e) [[WARNING]] php.ini has magic_quotes_gpc set to off: FAILED
otwieramy /etc/php5/apache2/php.ini
sudo nano /etc/php5/apache2/php.ini
i podmieniamy linię
short_open_tag = On
na
short_open_tag = Off
oraz zmianiamy
magic_quotes_gpc = On
na
magic_quotes_gpc = Off
Na koniec restartujemy serwer:
sudo /etc/init.d/apache2 restart
wywołujemy http://localhost:6060/lib/vendor/symfony/data/bin/check_configuration.php
i mamy nadzieję, że nie mam żadnych warningów.
8. cd ~/workspace/mathforum
9. php lib/vendor/symfony/data/bin/symfony generate:project mathforum
10. php symfony generate:app --escaping-strategy=on --csrf-secret=UniqueSecret frontend
11. w pliku config/ProjectConfiguration.class.php zmianiamy linijkę
require_once '/home/michal/workspace/mathforum/lib/vendor/symfony/lib/autoload/sfCoreAutoload.class.php';
na
require_once dirname(__FILE__).'/../lib/vendor/symfony/lib/autoload/sfCoreAutoload.class.php';
12. http://localhost:6060/frontend_dev.php/ i http://localhost:6060/index.php/ musi działać
Brak komentarzy:
Prześlij komentarz