Installing PHP5 Twig Extension
Environment: Ubuntu
The PHP5 source needed for compiling additional modules
sudo apt-get install gcc php5-dev
Compiling Twig Source Code
1 2 3 4 5 6 |
git clone https://github.com/fabpot/Twig.git cd Twig/ext/twig/ sudo phpize sudo ./configure sudo make sudo make install |
Installation
PHP5
vim /etc/php5/conf.d/twig.ini
PHP5-FPM
vim /etc/php5/fpm/conf.d/twig.ini
Add the following to your twig.ini
file
1 |
extension=twig.so |
Restarting
PHP5
sudo service apache2 restart
PHP5-FPM
sudo service php5-fpm restart