While trying to upgrade from 7.9 to 7.10 I get the following error when trying to access my site

Parse error: syntax error, unexpected T_CLASS in /home/lprfc02/public_html/sterchs/includes/bootstrap.inc on line 287

I recopied the 7.9 files back and now still get the same error with 7.9. Does anyone have a solution for this as I can not currently access my site without a resolution.

Comments

jheyboer’s picture

I was experiencing the same issue when I remembered my web host (1and1) requires "AddType x-mapp-php5 .php " to be added to the htaccess file so the server doesn't use the default PHP4.

When I added this, it worked.

holg3r’s picture

My hosting provider is also 1und1.

For me the following two lines did the job:

AddHandler x-mapp-php5  .php
Action  x-mapp-php5 /system-bin/php5exe

I copied these lines from a drupal instance that was set up by the automatic 1und1 configuration service "click and build" -- so these lines are what 1und1 adds themselves.

I am using the latest drupal 7.12.

a1sysman’s picture

I experienced exactly the same error when I installed Drupal v7.14 to my site hosted by 1and1. However, I did not have to amend the htaccess file. I came at it another way...

From the 1and1 Control Panel > Domains & Web Space > Global PHP Version > change PHP 4 to PHP 5 and [Save] the settings. Reload the web page. Job done!

I found the 1and1 instructions for installing Drupal excellent. Top marks go to 1and1.

gbestwick’s picture

I got this same error when I was checking the PHP settings with my Host. I accidently set it to use PHP4, which caused it to crap itself.

Once I set it back to use PHP5 I was just fine.

If your host uses cPanel, you can go to PHP configuration, and ensure that the top pull down says:

The .php file extension will be processed by PHP 5

I hope this helps.