This is a multi-part question encapsulating FAQs for Drupal 8 running on Site5.
– What is Site5’s position on Drupal 8?
– How can we use drush with Drupal 8?
When trying to use `drush` on a Drupal 8 site, I receive the following error:
— Fatal error: Class ‘Drupal\Core\Session\AccountInterface’
I’m able to run a Drupal 8 site on Site5 by adding the following line to the top of the .htaccess file that comes with Drupal 8:
AddHandler application/x-httpd-php54 .php
Drupal 8 should work normally on our servers. I am not sure what you mean by our ‘position’ on the script, but you are able to install and run it. Also, drush should work normally, and the error you are seeing should be brought to our support team via a ticket; we would be happy to look into that for you, but that is more complex than we can really handle through this medium. The line you have added to .htaccess forces your account to use PHP 5.4, which is a requirement for Drupal 8.
Thanks @jdavey. With the help of Site5 support and this article https://www.drupal.org/node/2366283, I was able to get PHP Composer and Drush set up for Drupal 8:
# ssh into your site, hop into the home directory
# install composer
curl -sS https://getcomposer.org/installer | php
mv composer.phar bin/
# open .bash_profile and add some aliases for php, php-cli, composer and drush
alias composer=”/usr/local/php54/bin/php ~/bin/composer.phar”
# now re-load your .bash_profile
# if all goes well, composer will work
# and so will drush
I’m not able to edit my original question (I’m redirected to http://qa.site5.com/my-account/ when clicking “Edit Post”), or my other answer, so I guess I’ll post another answer with more findings on this topic:
Drupal 8 needs PHP 5.5 (https://www.drupal.org/requirements) and PHP 5.5 is not (yet) available on shared or VPS accounts with Site5. It is available for installation on your own UVPS account: http://kb.site5.com/php/how-to-change-your-php-version/
All mention of PHP 5.4 above is not recommended (sorry for the misinformation), but somehow it still works for some basic Drupal 8 stuff, but you definitely won’t be able to run update.php or drush up successfully without PHP 5.5 and am sure you’ll run into other oddities. Proceed with caution…
2016-01-19: To follow up, my Site5 Managed VPS is now running PHP 5.5.30, which at first glance appears to be OK, but still doesn’t meet the Drupal 8’s minimum of 5.5.9.
Also Drush now appears to work out of the box, but composer does not. Answer #2’s still works for installing composer, but you only need to add this one line to your .bash_profile:
alias composer=”/usr/local/php55/bin/php ~/bin/composer.phar”
Be careful when copying and pasting the alias command here, you may be copying a non standard double quote, which will break your bash profile.
You must be Logged In to post an Answer.
Not a member yet? Sign Up Now »