
By elevarni on
Hello everyone.
I've installed Drupal 8 and got a notice on the status page about installing the Twig C extension. I followed the link;
http://twig.sensiolabs.org/doc/installation.html
...however, there's only this relevant path in the Drupal 8 installation directory:
./vendor/twig/twig
which has these contents:
CHANGELOG composer.json lib LICENSE phpunit.xml.dist README.rst
There's no "ext" directory to change into. ./vendor/twig only contains the "twig" directory. Am I looking in the wrong location? I followed the instructions in a forum post to find where I should be looking for the correct directory, but it doesn't appear to be present on my install.
Comments
Twig C extension is a php
Twig C extension is a php extension which is supposed to be added in to ext folder under php directory not in to /vendor/twig/twig . The installation guide can be found at http://twig.sensiolabs.org/doc/installation.html#installing-the-c-extension
Thanks - that corrects one
Thanks - that corrects one misunderstanding. As someone who has never installed a php extension before those instructions (which were the ones I was going from) didn't explicitly say where to do that... obvious if you know, I suppose!
Next problem - there's no "ext" folder anywhere in the php folder structure under /etc/php5 - I'm using nginx and php5-fpm, does that change anything?
...or I just had a thought. Should I be following those instructions from the beginning and starting with:
composer require twig/twig:~1.0
?
Twig C Extension not available issue
I recently installed Drupal 8 and also saw that Twig C extension is not available on my shared host. I contacted their customer support (One.com) and found that adding the Twig C extension for PHP is not something that they will do as they do no change the php.ini files for their servers. That being the case, I am wondering of possible side effects that may arise of the situation.
Right now, my issue at the moment is that the blocks that I am placing are not appearing on my site. Could not having this extension available cause a problem with block layout?
Are you still experiencing
Are you still experiencing this issue? It doesn't sound related to the Twig Extension thing (in fact, you should ignore it- no benefit). Are the blocks being saved properly?
The link provided on the
The link provided on the status page in not very helpful. Also, in case anyone wonders, the Twig C Extension is not compatible with PHP 7. And it looks like they won't be upgrading it soon (if at all).
I actually managed to install it on php5 before (after spending many hours trying to figure out where to put what, of course) but the difference was barely noticeable. Best performance boost is to use OPCache. But then again D8 is so fast out of box already.
In my opinion this status message can be ignored and should be removed from the status page.
Bogus status report
my report says:
and;
that's sweet
How to install and configure on a shared hosting provider
Here's how I installed the twig C extension using Composer on my Dreamhost shared hosting account:
Hope this helps people a bit ;)
A Day In The Life
Drupal 8 Twig C extension using Composer on Dreamhost PHP 5.6
Installs as described by Jean Gionet. Thank you!
does it seem useful
Jean and Marc, have you seen any noticeable improvements since getting this successfully installed on Dreamhost shared account? Is it worth the 5 minutes to install/configure and potentially maintain?
Hi,
Hi,
I would not say that I have seen any earth shattering differences, but its probably worth just spending the extra 5 minutes to install.
Best Regards,
Marc
Twig not available on shared server
Hello.
Looks like not all shared server hosting companies have the Twig C extension available for Drupal 8 even though the installation of Drupal 8 can be done via Softaculous. The reason provided is it must be enabled globally (effecting all shared server users) versus installed/enabled locally. The solution is to e.g. get a cloud plan. The instructions via https://groups.google.com/forum/#!topic/twig-users/YcghbZMKD8w didn't seem to work when tried.
How will D8 perform without Twig?
Thanks!
=-=
quoted from: http://twig.sensiolabs.org/doc/installation.html
It's optional for twig which is why its optional for Drupal 8. Also of note, your question is answered in the 3rd comment of the link you posted above.