1

I'm trying to do a minor security upgrade to Drupal 8.1.7 When I load update.php it gives me a blank page (no errors).

I upgraded all of the software with the exception of the root .htaccess and robots.txt files.

I'm getting this error:

PHP Parse error: syntax error, unexpected T_STRING, expecting T_CONSTANT_ENCAPSED_STRING or '(' in /home/energy/public_html/index.php on line 11

The line causing the error is the following one.

use Drupal\Core\DrupalKernel;
2
  • I'm running PHP 5.2.9. This is probably the problem as Drupal now requires 5.3. It is very strange as the previous versions of Drupal 8 ran fine on PHP 5.2.9. Jul 19, 2016 at 21:56
  • You should use PHP 7 as its much faster than 5.5.9 or any other 5.something version
    – No Sssweat
    Jul 19, 2016 at 22:53

1 Answer 1

5

Drupal 8 requires PHP 5.5.9. If you are using PHP 5.2.9, it doesn't recognize as valid a line like use Drupal\Core\DrupalKernel; since namespaces were introduced in PHP 5.3.

If you were already running a stable release of Drupal 8 before, check you didn't change in someway the PHP version used from your site.

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

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