No Styles Showing Up On Apache/mac When Installing Existing Mv Instance

Hi,

I succesfully deployed the same version of cs cart on multiple linux environments, but when installing locally on my mac/apache from the same repo, after getting through a number of permissions errors and setting them all up (+chowning the whole dir to apache daemon user), I get to the frontend and backend, but with COMPLETELY zero styles, just old schoold blue/violet html.

There's no 404s in any loaded resources and all seems fine, nothing in cs cart or apache log. Any ideas or suggestion what to check/change?

One strange thing is that on this site there's a 353kb sandalone.[long-hash].css being loaded (the content seems legit, full of css rules), while at the working envionments the standalone bundle has 58kb, even though the files and db is the same.

Any ideas? Many thanks!

Hello aaimnr,

this issue is arising due to wrong directory path in config.local.php

check there you will definitely find solution.

Hello aaimnr,

this issue is arising due to wrong directory path in config.local.php

check there you will definitely find solution.

Hey there, thanks for prompt response! Unfortunately the path seems ok, at least if you're thinking about:

$config['http_path'] - without it set properly it doesn't work at all. Also, would the wrong setting result in 404s for css?

Thanks!

BTW I have a symlink in root apache dir and the 'http_path' setting contains this symlink exactly. Otherwise it results in just 'not found'. It should containt the physical dir on disk, right, but rather the URL segment after the host?

FYI if I point apache root dir directly to CS Cart directory (which avoids symlinks which are often problematic), the problem still persists, even though the config['http_path'] is just "/" and cannot be wrong now.

Any ideas? What could I check to diagnose it further? Eg. to check why 'standalone' css bundle has different size than on different environments with the same codebase?

Hello aaimnr,

Please try to use MAMP instead of default apache on Mac. I am using it on my Macbook and installed already 50+ test stores without changing the ownership of files or any other issues. It is very easy to setup and use it.

Wow, thanks a million, it indeed solved the problem. Some day will try to investigate why it doesn't work on hombrew apache, but for now it's perfect. By the way, it's extremely slow (the only thing I changed in MAMP was to turn on APC), is there anything else I can do? I'm running on SSD macbook air, so shouldn't be that bad...

BTW for opcache (which is recommended by the cs cart team) the results are the same - ~10 sec per page

BTW for opcache (which is recommended by the cs cart team) the results are the same - ~10 sec per page

Check the waterfall of the page load / resources then start looking at what might be going wrong. APC will only be of use if you are using PHP 7.x.

I'd suggest looking at Browser Caching and server side headers to keep the expiry of static resources over a period of a few weeks / months depending on your update frequency. I can help with server optimisation if you want to drop me a PM.

Memcache is also another alternative and Redis for session caching depending again on your traffic, site needs.

Beyond that, optimising content, images, CSS, Javascript delivery are among the many other tweaks. Also if you have server access its better to place the .htaccess rules inside apache for more resource / mem saving as Apache will poll each time to search for .htaccess recursively, thus leading to more slow TTFB (Time to First Byte) issues.

Etags, Expires, Vary headers and so on are other areas to look into :-) I've managed to fix all but a few small issues on my instance of CS Cart, also delete any unused addons, disabling the addon isn't often sufficient in some cases!

Wow, thanks a million, it indeed solved the problem. Some day will try to investigate why it doesn't work on hombrew apache, but for now it's perfect. By the way, it's extremely slow (the only thing I changed in MAMP was to turn on APC), is there anything else I can do? I'm running on SSD macbook air, so shouldn't be that bad...

Here I found the same problem. Please try suggestions from the answers: https://stackoverflow.com/questions/8452614/mamp-reloading-pages-is-very-slow