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
Solved! Go to Solution.
What version of PHP are you running on?
Thank you so much.... I was running the wrong version of php.
Magento 2 installed and running.
I have same problem, which version of php are you using?
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
( ! ) 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
1 | 0.0003 | 251048 | {main}( ) | ..\index.php:0 |
2 | 0.0007 | 263864 | require( 'C:\wamp\www\Magento\app\bootstrap.php' ) | ..\index.php:22 |
3 | 0.0010 | 273080 | require_once( 'C:\wamp\www\Magento\app\autoload.php' ) | ..\bootstrap.php:30 |
4 | 0.0471 | 856336 | Composer\Autoload\ClassLoader->loadClass( ) | ..\bootstrap.php:0 |
5 | 0.0473 | 856464 | Composer\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
Hello,
I see the check mark "solved" but were is the solution. Having the same problem trying to upgrade Magento 2.
Your are update php": "~5.6.5|7.0.2|7.0.4|~7.0.6
Phuot
I'm using PHP 5.0.2