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)
Data folder is a level below the web root, permission for data folder is 755
Great
I have the simple cache and system cache turned off in elgg
Why not enable these options?
fastcache, localfastcache, views_simplecache; views_simplecache is empty
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:
chown -R httpd2:httpd2 /var/data
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.
Please note that access to your folder must be on behalf of the server, e.g. apache, httpd2 etc
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.
<?php
echo "User info...";
$processUser = posix_getpwuid(posix_geteuid());
print $processUser['name'];
echo '<br>' . var_dump($processUser);
?>
Advanced way is to override this file in your custom plugin.
(You can start with this skeleton plugin.)
Create a new folder 'assets' in your data directory.
Put your logo to this folder, e.g.:
assets/topbar_logo.png
Copy the mentioned file to your custom plugin and change code on:
$asset_src = elgg_get_simplecache_url('assets/topbar_logo.png');
$logo = elgg_format_element('img', [
'src' => $asset_src,
'alt' => elgg_get_site_entity()->getDisplayName(),
]);
echo elgg_format_element('div', [
'class' => 'elgg-heading-site'
], elgg_view('output/url', [
'text' => $logo,
'href' => elgg_get_site_entity()->getURL(),
'title' => elgg_get_site_entity()->getDisplayName(),
]));
Without code it's difficult to understand what's happening.
No code means no help.
If the code is large, place it on GitHub, GitLab and publish the link here so other developers can see your project.
Also one of the common development pitfalls is caching. Make sure eighter caching is disabled or after you create a new view, class or add a language string invalidate the cache.
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.