0

I just installed Magento on localhost, the installation succeed, however when I open the store non of the media, CSS and JS loads due to magento generating an incorrect URL, here is an example:

http://localhostskin/frontend/enterprise/default/css/widgets.css

Note how it concatenated localhost with the "skin" folder, this is due to a missing forward slash, however I've been unable to fix the issue, both my secure and web unsecured urls on the core_config_data (web/secure/base_url and web/unsecure/base_url )are set to :

http://localhost/

I installed magento on top of the zend framework, also my local.xml seems to be fine:

<host><![CDATA[localhost/]]></host>

I've been struggling on this but I cant fix it, has anyone encounter with these type of issues?

Note that I'm unable to login to the admin console (due to the JS files not loading)

5
  • If the base url is correct, the base url is not used. Did you clean the cache? – Fabian Blechschmidt Nov 1 '13 at 18:52
  • Can you remove all the cache files (and session) in your var/cache and var/session folder? – brentwpeterson Nov 1 '13 at 20:53
  • sorry, and var/full_page_cache/* – brentwpeterson Nov 1 '13 at 20:53
  • did that and it didnt work! – isJustMe Nov 1 '13 at 21:17
  • 2
    Plesae check if you have more than one base_url setting, due to different sotre views. They could still have the wrong setting. – Tobias Nov 2 '13 at 12:53
3

This is not the solution to your problem above, but it could be a way for you to get it running. Sometimes it makes trouble to run magento under "localhost".

Try to work with a fake hostname for ex. www.myshop.local and add this fake hostname to your hostfile (pointing to 127.0.0.1) or use http://127.0.0.1 as your url. If you are working on Windows you you find this file under C:\Windows\System32\drivers\etc and on Linux in /etc.

127.0.0.1   www.myshop.local
127.0.0.1   myshop.local

Hope you get it running with this!

Also, I checked with one of my running configurations, the entry in my local.xml is without the slash at the end:

<host><![CDATA[localhost]]></host>

Anyway, it would be interesting what caused your problem.

1
  • I tried this but I get the same behavior, except of course it appends to the new url instead of just local host – isJustMe Nov 4 '13 at 16:19
0

Solution was to create a Virtual Host on Zend Server, then edit the path to the root of magento, this of course before installation. If you do this after installing make sure to edit the links on core_config_data

0

Ran into this problem recently on version 1.9. I was able to fix it by disabling auto-redirect to base url. Not sure why that worked but it did.

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.