0

According to my research this issue seems to be pretty popular in new Magento 2.x installations. Unfortunately no other question helped to resolve my issue.

I am running a PHP Server at 1&1 with PHP 7.0 Version and installed the latest Magento Community edition.

The setup-process went fine. But unfortunately no js or css resources can be loaded.

I already changed the DriverInterface.php and also updated all folders to 755 and files to 644 according to another answer.

I already also changed Magento\Framework\App\View\Asset\MaterializationStrategy\Symlink to Magento\Framework\App\View\Asset\MaterializationStrategy\Copy in the di.xml

my htaccess has / as rewritebase

Unfortunately the issue still persists.

If any1 has other ideas that might fix the issue I would gladly try them out.

Thank you for your time.

update

As suggested in an answer I tried doing the following:

php <your Magento install dir>/bin/magento cache:clean
php <your Magento install dir>/bin/magento setup:static-content:deploy
php <your Magento install dir>/bin/magento dev:source-theme:deploy

The 1&1 Shared Webhosting should be running on PHP7 according to their interface, but when I type in php -v I get 4.4.9. Upon trying out different php calls I realized that the highest I can get is 5.5 with php5.5.

When typing php5.5 bin/magento cache:clean It tells me that it has to be run as cli.

After trying it with php5.5-cli bin/magento cache:clean I get an error:

Parse error: syntax error, unexpected '.' in /homepages/41/d674471379/htdocs/dev/vendor/magento/framework/ObjectManager/Factory/AbstractFactory.php on line 93

The line where the error is being thrown: return new $type(...array_values($args)); so I assume that it can't interpret the ...

4
  • yes you need 5.6 lornajane.net/posts/2014/php-5-6-and-the-splat-operator Commented Mar 24, 2017 at 8:32
  • Any way to work around this when I can't manually implement 5.6 in a shared hosting enviroment? Commented Mar 24, 2017 at 8:45
  • i don't know configure at your localhost and just upload on shared hosting maybe help but shared hosting it's not good idea for magento 2 Commented Mar 24, 2017 at 9:09
  • unfortunately i have to work with the server that our client provides me :/ Commented Mar 24, 2017 at 12:07

2 Answers 2

2

It appears that changes in pub/static/.htaccess were required. The RewriteBase had to be changed to /pub/static/

Sign up to request clarification or add additional context in comments.

Comments

1

the files is present in pub/static folder? Disable all merge and minify options in core_config_data try in console

php <your Magento install dir>/bin/magento cache:clean
php <your Magento install dir>/bin/magento setup:static-content:deploy
php <your Magento install dir>/bin/magento dev:source-theme:deploy

if it's not help provide more information about your error

1 Comment

Thank you for your answer! I updated my question accordingly.

Your Answer

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.