Site5 - Built For Designers & Developers MENU

Drupal 8

[2 Grey Star Level]

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’

# Progress

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

Answer #1

Hello,

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.

Answers Answered By: jdavey [359 Blue Star Level]

Answer #2

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
ssh [email protected]
cd ~

# install composer
curl -sS https://getcomposer.org/installer | php
mkdir bin
mv composer.phar bin/

# open .bash_profile and add some aliases for php, php-cli, composer and drush
vim .bash_profile
alias php=”/usr/local/php54/bin/php”
alias php-cli=”/usr/local/php54/bin/php”
alias composer=”/usr/local/php54/bin/php ~/bin/composer.phar”
alias drush=”~/.composer/vendor/bin/drush”
export DRUSH_PHP=/usr/local/php54/bin/php

# now re-load your .bash_profile
source ~/.bash_profile

# if all goes well, composer will work
composer

# and so will drush
drush status

Answers Answered By: frankenstein [2 Grey Star Level]

Answer #3

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…

Answers Answered By: frankenstein [2 Grey Star Level]

Answer #4

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.

Answers Answered By: frankenstein [2 Grey Star Level]

Answer this Question

You must be Logged In to post an Answer.

Not a member yet? Sign Up Now »

Money Back Guarantees
Click to verify BBB accreditation and to see a BBB report.