0

When I run in my terminal: php bin/magento setup:static-content:deploy

which is supposed to be the fix for css and js not loading, I get this:

PHP Parse error: parse error in /Magento/vendor/magento/framework/ObjectManager/Factory/AbstractFactory.php on line 93

I'm on a Mac using the main local web server. Not MAMP. Please someone tell me how to fix this before I give up on Magento.

PHP version 5.5.30, and I've changed root links in db to 127.0.0.1, Magento version 2.1.4 with data.

Thanks

Rajeev K Tomy
17.3k6 gold badges64 silver badges104 bronze badges
asked Feb 12, 2017 at 4:36

2 Answers 2

0

You need to upgrade your PHP version to at least 5.6.5. You can see in the DevDocs that Magento no longer supports PHP 5.5.

answered Feb 12, 2017 at 8:09
0

This is the function that assert error in your case.

protected function createObject($type, $args)
{
 return new $type(...array_values($args));
}

You can see three dots (...) in the call new $type(...array_values($args));. This three dots token is know as Variable Argument List which is available only for php versions greater than 5.6.

So what you need to do here is upgrade your php version 5.6.5 or later as per the M2 version you are using.

If you can upgrade to php 7.x version, then that will be great.

answered Feb 12, 2017 at 8:35

Your Answer

Draft saved
Draft discarded

Sign up or log in

Sign up using Google
Sign up using Email and Password

Post as a guest

Required, but never shown

Post as a guest

Required, but never shown

By clicking "Post Your Answer", you agree to our terms of service and acknowledge you have read our privacy policy.

Start asking to get answers

Find the answer to your question by asking.

Ask question

Explore related questions

See similar questions with these tags.