cancel
Showing results for 
Search instead for 
Did you mean: 

Parse error when trying to access the setup page

SOLVED

Parse error when trying to access the setup page

I am trying to install 2.1 on shared web server (with no command line access).

 

Steps followed:

Downloaded Magento-CE 2.1.2

Uploaded .zip file to host server public_html

Extracted files

Went to example.com/setup (where example is my domain)

 

I expected to finish the install with the magento setup wizard, but received the following error:


Parse error: syntax error, unexpected 'class' (T_CLASS), expecting identifier (T_STRING) or variable (T_VARIABLE) or '{' or '$' in/[root]/[user]/public_html/vendor/magento/framework/App/Bootstrap.php on line 411

1 ACCEPTED SOLUTION

Accepted Solutions

Re: Parse error when trying to access the setup page

What version of PHP are you running on?

View solution in original post

10 REPLIES 10

Re: Parse error when trying to access the setup page

What version of PHP are you running on?

Re: Parse error when trying to access the setup page

Thank you so much.... I was running the wrong version of php.

Magento 2 installed and running.

Re: Parse error when trying to access the setup page

I have same problem, which version of php are you using?

Re: Parse error when trying to access the setup page

I get the same error, but I'm using PHP 5.4 :

 

[root@stone02 bin]# /usr/bin/env php --version

PHP 5.4.16 (cli) (built: Aug 11 2016 21:24:59)

Copyright (c) 1997-2013 The PHP Group

Zend Engine v2.4.0, Copyright (c) 1998-2013 Zend Technologies

 

[root@stone02 bin]# ./magento

PHP Parse error:  syntax error, unexpected 'class' (T_CLASS), expecting identifier (T_STRING) or variable (T_VARIABLE) or '{' or '$' in /usr/share/nginx/html/vendor/magento/framework/App/Bootstrap.php on line 411

 

what now? Thanks, Hank

Re: Parse error when trying to access the setup page

( ! ) Parse error: syntax error, unexpected 'class' (T_CLASS), expecting identifier (T_STRING) or variable (T_VARIABLE) or '{' or '$' in C:\wamp\www\Magento\vendor\m

( ! ) Parse error: syntax error, unexpected 'class' (T_CLASS), expecting identifier (T_STRING) or variable (T_VARIABLE) or '{' or '$' in C:\wamp\www\Magento\vendor\magento\framework\App\Bootstrap.php on line 411 Call Stack # Time Memory Function Location

10.0003251048{main}( )..\index.php:0
20.0007263864require( 'C:\wamp\www\Magento\app\bootstrap.php' )..\index.php:22
30.0010273080require_once( 'C:\wamp\www\Magento\app\autoload.php' )..\bootstrap.php:30
40.0471856336Composer\Autoload\ClassLoader->loadClass( )..\bootstrap.php:0
50.0473856464Composer\Autoload\includeFile( )..\ClassLoader.php:301

agento\framework\App\Bootstrap.php on line 411

 

I am getting above error while trying to setup Magento. Can you please help?

thanks l Arun

Re: Parse error when trying to access the setup page

Hello,

 

I see the check mark "solved" but were is the solution. Having the same problem trying to upgrade Magento 2.

Re: Parse error when trying to access the setup page

Your are update  php": "~5.6.5|7.0.2|7.0.4|~7.0.6

Phuot

Re: Parse error when trying to access the setup page

I'm using PHP 5.0.2

Re: Parse error when trying to access the setup page

Do you mean PHP 7.0.2?

 

PHP 5.0.2 was released in 2004.

-Kris
4x Certified, Blogger @ xgento.com