Hello,

I just uploaded my D8 website, imported the database and added my database/user names and passwords to the settings.php file.

When I go to view my site, I get a WSOD. When I go to http://xx.xx.xxx.xxx/mysite/error_log, I get the following message:

[23-May-2016 11:14:15 America/Denver] PHP Parse error: syntax error, unexpected 'CLASS' (T_CLASS), expecting identifier (T_STRING) or variable (T_VARIABLE) or '{' or '$' in /home2/mywebsite/public_html/core/lib/Drupal/Core/Extension/ModuleInstaller.php on line 221

I spoke with my server provider who are used to hosting Drupal websites and they said there is a problem with D8 core.

How can I fix this please? I have a client who needs this to go live soon but I am not comfortable hacking the core. The local version is working just fine and throwing no errors.

Thank you in advance for any help.

M

Comments

lilbebel created an issue. See original summary.

bojanz’s picture

Category: Bug report » Support request
Status: Active » Fixed

Your server doesn't satisfy Drupal's requirements. D8 requires PHP 5.5 or newer, your server has an older version.

lilbebel’s picture

Thank you Bojanz.

lilbebel’s picture

Hello,

I updated the php version on the server to:

PHP 5.6 [Beta, check site functionality for compatibility after enabling]
All files with the extension .php will be handled by the PHP 5.6 engine.
Latest version of PHP.

There was no option for version 5.5

Now, there are the following errors on errors_log page:

[23-May-2016 11:13:04 America/Denver] PHP Parse error: syntax error, unexpected 'CLASS' (T_CLASS), expecting identifier (T_STRING) or variable (T_VARIABLE) or '{' or '$' in /home2/adaptjb7/public_html/core/lib/Drupal/Core/Extension/ModuleInstaller.php on line 221
[23-May-2016 11:13:50 America/Denver] PHP Parse error: syntax error, unexpected 'CLASS' (T_CLASS), expecting identifier (T_STRING) or variable (T_VARIABLE) or '{' or '$' in /home2/adaptjb7/public_html/core/lib/Drupal/Core/Extension/ModuleInstaller.php on line 221
[23-May-2016 11:14:15 America/Denver] PHP Parse error: syntax error, unexpected 'CLASS' (T_CLASS), expecting identifier (T_STRING) or variable (T_VARIABLE) or '{' or '$' in /home2/adaptjb7/public_html/core/lib/Drupal/Core/Extension/ModuleInstaller.php on line 221
[23-May-2016 12:17:32 America/Denver] PHP Parse error: syntax error, unexpected 'CLASS' (T_CLASS), expecting identifier (T_STRING) or variable (T_VARIABLE) or '{' or '$' in /home2/adaptjb7/public_html/core/lib/Drupal/Core/Extension/ModuleInstaller.php on line 221
[23-May-2016 12:17:47 America/Denver] PHP Parse error: syntax error, unexpected 'CLASS' (T_CLASS), expecting identifier (T_STRING) or variable (T_VARIABLE) or '{' or '$' in /home2/adaptjb7/public_html/core/lib/Drupal/Core/Extension/ModuleInstaller.php on line 221
[23-May-2016 18:21:07 UTC] Uncaught PHP Exception Drupal\Core\Database\DatabaseExceptionWrapper: "Exception in Frontpage[frontpage]: SQLSTATE[HY000]: General error: 1 near ",": syntax error: INSERT OR REPLACE INTO {cache_config} (cid, expire, created, tags, checksum, data, serialized) VALUES (:db_insert_placeholder_0, :db_insert_placeholder_1, :db_insert_placeholder_2, :db_insert_placeholder_3, :db_insert_placeholder_4, :db_insert_placeholder_5, :db_insert_placeholder_6), (:db_insert_placeholder_7, :db_insert_placeholder_8, :db_insert_placeholder_9, :db_insert_placeholder_10, :db_insert_placeholder_11, :db_insert_placeholder_12, :db_insert_placeholder_13), (:db_insert_placeholder_14, :db_insert_placeholder_15, :db_insert_placeholder_16, :db_insert_placeholder_17, :db_insert_placeholder_18, :db_insert_placeholder_19, :db_insert_placeholder_20), (:db_insert_placeholder_21, :db_insert_placeholder_22, :db_insert_placeholder_23, :db_insert_placeholder_24, :db_insert_placeholder_25, :db_insert_placeholder_26, :db_insert_placeholder_27); Array
(
[:db_insert_placeholder_0] => language.en:language.entity.en
[:db_insert_placeholder_1] => -1
[:db_insert_placeholder_2] => 1464027667.568
[:db_insert_placeholder_3] =>
[:db_insert_placeholder_4] => 0
[:db_insert_placeholder_5] => b:0;
[:db_insert_placeholder_6] => 1
[:db_insert_placeholder_7] => language.en:language.entity.fr
[:db_insert_placeholder_8] => -1
[:db_insert_placeholder_9] => 1464027667.568
[:db_insert_placeholder_10] =>
[:db_insert_placeholder_11] => 0
[:db_insert_placeholder_12] => b:0;
[:db_insert_placeholder_13] => 1
[:db_insert_placeholder_14] => language.en:language.entity.und
[:db_insert_placeholder_15] => -1
[:db_insert_placeholder_16] => 1464027667.568
[:db_insert_placeholder_17] =>
[:db_insert_placeholder_18] => 0
[:db_insert_placeholder_19] => b:0;
[:db_insert_placeholder_20] => 1
[:db_insert_placeholder_21] => language.en:language.entity.zxx
[:db_insert_placeholder_22] => -1
[:db_insert_placeholder_23] => 1464027667.568
[:db_insert_placeholder_24] =>
[:db_insert_placeholder_25] => 0
[:db_insert_placeholder_26] => b:0;
[:db_insert_placeholder_27] => 1
)
" at /home2/adaptjb7/public_html/core/modules/views/src/Plugin/views/query/Sql.php line 1452

In addition, the WSOD now has a single message on a white screen:

The website encountered an unexpected error. Please try again later.

The website was developed locally using php version 5.5.33 and is fine.

Any idea what this is and how I might address it?

Thank you.

M

lilbebel’s picture

Status: Fixed » Active
cilefen’s picture

Status: Active » Fixed

You have a problem with the PHP requirements. This is something you must work with your server provider about.

I spoke with my server provider who are used to hosting Drupal websites and they said there is a problem with D8 core.

There are thousands of Drupal 8 sites in production. If your server provider identified a bug in D8 core (you did not specify), or all requirements are met and still Drupal doesn't run, reopen this issue.

lilbebel’s picture

Thank you Cilefen. I'm going to talk to them again and ask them if they are currently hosting any Drupal 8 websites successfully and if so, which version of D8 are they running on their server. I have a feeling that they are not yet fully compatible with the latest version of 8 but will know more after I've spoken to them. They told me to contact the developers but having spoken to some developers, I now believe that it is a server issue. They did not identify a bug in core but simply told me that there was a problem in core and they had no idea what it was it was which is not very reassuring or helpful. They said that they are not trained to interpret the error log. What I need to do is talk to someone at the host company who can tell me for certain that they are currently hosting stable up-to-date D8 websites. Thank you for your feedback.

lilbebel’s picture

Hello,

So, I called the host provider again and asked to speak to a manager. I was finally able to get a confirmation that they do NOT support Drupal 8 at this time. I wish they had known this and told me days ago. Anyway, it may save someone else some time wasting and frustration. The company is Bluehost. For now, they don't support D8 and they couldn't tell me if they are going to update their servers to accommodate it. They may or may not. Time will tell.

Thanks for everyone's help.

M

lilbebel’s picture

I've changed server providers to siteground.com and they are excellent for D8. Good price, tech support and their servers are up to date to handle D8.

Status: Fixed » Closed (fixed)

Automatically closed - issue fixed for 2 weeks with no activity.

prakashsingh’s picture

I had the same issue.. but with GoDaddy Hosting there was an option in Cpanel to select the PHP version you want..

and choosing PHP 5.5 resolved this issue..

Thanks

golddragon007’s picture

This message was for me really random and unknown reason. Once I installed a module, than happened something and I started to get this error on 5.6.19 PHP with Acquia dev desktop (Sep 5 2016 build). (Before that I get an error whit the drupal can't find Drupal\tvi\Controller\TaxonomyViewsIntegratorTermPageController class from tvi module /there was a view where it was used this class/, but physically it was the right place the class file.)
For a time drush cr run, but after a while it started to drop this error "PHP Parse error: syntax error, unexpected 'class' (T_CLASS), expecting identifier (T_STRING) or variable (T_VARIABLE) or '{' or '$' in [...]".
I stopped the server and started again, nothing difference. Than I changed my php version to 7.0.4, than I was able to use drush cr without any error and after that my views started to work too. I changed back php to 5.6.19 and still works. I can't understand what happened, this was a magic probably.

Vikas Chavan’s picture

kindly update your server.

apaderno’s picture

Version: 8.1.1 » 8.1.x-dev
Component: php.module » other