cancel
Showing results for 
Search instead for 
Did you mean: 

Syntax error, unexpected '.' AbstractFactory.php Line 93

Syntax error, unexpected '.' AbstractFactory.php Line 93

 

I am receiving this error message:
stevep@Inspiron-3543:/var/log/apache2$ [Fri Oct 14 07:03:02.224998 2016] [:error] [pid 28497] [client 192.168.1.212:50655] PHP Parse error: syntax error, unexpected '.' in /var/www/html/vendor/magento/framework/ObjectManager/Factory/AbstractFactory.php on line 93

 

This is a new laptop, running Ubuntu 14 and this is a fresh installation.  This occurs when I attempt to open Magento (index.php) from the web browser to complete the installation.

 

That offending line says:

return new $type(...array_values($args));

 

I don't recognize that syntax either.  What is with the extra dots?

 

I am attempting to install: Magento-CE-2.1.2-2016-10-11-11-19-27.tar

 

What is going wrong with this installation?

 

 

 

 

4 REPLIES

Re: Syntax error, unexpected '.' AbstractFactory.php Line 93

 I'm having the same problem. 

Someone could help please ? 

Re: Syntax error, unexpected '.' AbstractFactory.php Line 93

i also have this problem

i m installing the latest version on my brand new macbook pro 15". untar it on my web server (MAMP), then go to magento folder /bin 

try to run: php magento list  

 

$ php magento list

 

Parse error: parse error in /Applications/MAMP/htdocs/xxx/vendor/magento/framework/ObjectManager/Factory/AbstractFactory.php on line 93

$ php magento --list

 

Parse error: parse error in /Applications/MAMP/htdocs/xxx/vendor/magento/framework/ObjectManager/Factory/AbstractFactory.php on line 93

 

WHAT'S WRONG WITH IT? do i miss any setting?

 

quite frustrated Smiley Frustrated

Re: Syntax error, unexpected '.' AbstractFactory.php Line 93

I am having the same problem with Magento 2.1.2 and php 7.0.11

Re: Syntax error, unexpected '.' AbstractFactory.php Line 93

i solved mine by re-pointing mac's php path to MAMP's php

 

$ cat ~/.bash_profile

PHP_VERSION=`ls /Applications/MAMP/bin/php/ | sort -n | tail -1`

export PATH=/Applications/MAMP/bin/php/${PHP_VERSION}/bin:$PATH

 

check if your machine is using proper php:

 

$ php -v

PHP 7.0.10 (cli) (built: Aug 25 2016 17:32:10) ( NTS )

 

if not, re-point the path through .bash_profile or .profile. that's my solution