I installed elgg on a local machine and everything works fine. I installed it on a shared online hosting platform (where I host my web pages) and get a lot of cache errors and other errors.
- Layout was forced before the page was fully loaded. If stylesheets are not yet loaded this may cause a flash of unstyled content.
- 14:47:57.853 Loading failed for the module with source “https://xxx.com/cache/0/default/elgg/lightbox.mjs”.
I get this "Loading failed" message on a bunch of other .mjs files as well
I disabled the caches and flushed the elgg cache. Also flushed cache on Firefox browser.
The net effect is a lot of javascript code doesn't work, pressing the compacted menu button doesn't work, sometimes tabs don't work, etc; and often, jpg and other images don't show up. When I clear caches, the images show up first time I refresh the page, and don't show up if I refresh again.
Any ideas what things to look for?
info@elgg.org
Security issues should be reported to security@elgg.org!
©2014 the Elgg Foundation
Elgg is a registered trademark of Thematic Networks.
Cover image by Raül Utrera is used under Creative Commons license.
Icons by Flaticon and FontAwesome.
What about data folder and its permissions?
Data folder is a level below the web root, permission for data folder is 755
Web pages are served by apache, and it's my linux user ID apache uses when serving them.
I have the simple cache and system cache turned off in elgg. It does create cache directories in the data folder still (fastcache, localfastcache, views_simplecache; views_simplecache is empty, the others have subdirectories and files in them)
Great
Why not enable these options?
Please note that access to your folder must be on behalf of the server, e.g. apache, httpd2 etc
Try run this command via console on your server:
where,
- httpd2 - your server name (ask your hosting support)
- /var/data - path to your data directory
I didn't enable the cache right now, just so it won't be another component to check. I'll enable it when I get the problem I'm having resolved.
I suspect it's some kind of problem like this. The shared hosting server I'm using is supposed to be running as my linux user id, so while it's serving my pages, it will be the owner of the data. At least that's what I believe is going on. I ran the following script (Firefox browser, show_user.php file on the server), and the user ID it showed was my linux user id.
Please note you MUST use the server username to add the correct permissions to your data folder.
For example, read this where www-data is a server username.
Just go to your data folder and run
I'm not sure what you mean by this. On my local linux test machine, I have ssh access, and did chown -R www-data:www-data on the data directory and on the elgg root directory. Is this what you mean?
On the hosted server, the machine is shared with other users, but each user is isolated from others by additional server software. So effectively, my user is the only non-system user on the machine.
elgg works on my local linux test machine. On the hosted server, it partially works. I will open up the data directory to ugo (777), and see if it makes a difference. According to my hosting provider, giving o:rwx permission doesn't compromise anything to other users since the users are still isolated from each other.
I changed the data directory permissions to 777, cleared elgg cache and my browser's cache, and I still get the same problems.
Loading failed for the module with source “https://xxx.com/elggroot/cache/0/default/elgg/menus/dropdown.mjs”. Similar errors for about 15 other .mjs files for one page load.
When I use the URL for the .mjs file in a browser window, it loads! I wonder if apache is maxing out on serving a bunch of files. Or if it's a permission thing still.
Any idea where the cache/0/... is mapped to? I didn't see anything in the .htaccess file.
Elgg documentation says to use this for apache config file
Since I don't have access the apache server, I have to use .htaccess for this. Is there any documentation on what to put into the .htaccess file?
https://github.com/Elgg/Elgg/blob/6.x/install/config/htaccess.dist
- Previous
- 1
- 2
- Next
You must log in to post replies.