Tell me more ×
Drupal Answers is a question and answer site for Drupal developers and administrators. It's 100% free, no registration required.

I am getting following error during my Installation of Drupal 8

Parse error: parse error, expecting `T_CONSTANT_ENCAPSED_STRING' or `'('' in var\www\html\core\includes\bootstrap.inc on line 3

When I went to line number 3 in index.php I saw following two lines...

use Drupal\Core\DrupalKernel;
use Symfony\Component\HttpFoundation\Request;

I don't know what is the meaning of above two lines and why these are creating above error!

share|improve this question

1 Answer

Hopefully you're not installing Drupal 8 in the hope of using it as a stable website...it's nowhere near ready yet :)

That said, the reason you're getting the error is because the PHP const keyword has only been available for use in the global scope since PHP 5.3. Drupal 8 uses const in the global scope in a lot of places (correctly, as Drupal 8 will require at least PHP 5.3).

My guess is you have PHP 5.2 or lower installed on your server.

Some helpful links:

share|improve this answer
Actually, it's because use is not available in 5.2 but yes, it's because 5.2. – chx Jan 9 at 13:06

Your Answer

 
discard

By posting your answer, you agree to the privacy policy and terms of service.

Not the answer you're looking for? Browse other questions tagged or ask your own question.