Problem:
CSS does not get loaded and profile pictures are the same for all users (logged in user's). 2nd issue is pretty much the same as this: http://trac.elgg.org/ticket/1989
Quick description:
I made an Elgg site which was running fine on a server with Apache 2.2, PHP 5.2.13 and PHP running in DSO mode. All was fine, until I tried moving the site to an identical server, with the only difference being that PHP was running in CGI mode. If on the 2nd server I change PHP to run in DSO then the site works fine.
Bigger description:
After moving the site, the CSS wouldn't load if someone logged into the site. After searching for quite a while, I figured out that in "/simplecache/view.php" there was problem. The $view variable near the end of the file didn't have the correct value (just after line 60).
require_once(dirname(dirname(__FILE__)) . "/engine/start.php");
$contents = elgg_view($view);
$view before the require_once line had the correct value and after the require once had the wrong value. The easy fix for this was to just do this:
$view1 = $view;
require_once(dirname(dirname(__FILE__)) . "/engine/start.php");
$contents = elgg_view($view1);
This made the CSS file load properly and then the profile pictures problem came about.
Not sure how or why the variable gets overwritten, but to the best of my knowledge, the problem is generated through the sessions (and specifically the session_start() call in "/engine/lib/sessions.php" on line 510.
Following the instructions here: http://trac.elgg.org/ticket/1989 and commenting out the 2 lines at the bottom fixed the profile pictures problem.
My big question is why is this problem with PHP is running in CGI mode? Why does the session_start() line cause problems? These two hacks do fix the problem, but these are just the two problems that I've found. If the problem isn't fixed properly and I just put hacks in place I might run into more problems down the line!
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.
- Cash@costelloc

Cash - 0 likes
- Brett@brett.profitt

Brett - 0 likes
You must log in to post replies.I run one of my development machines on a Debian-based distro with Fast CGI and I don't have any problems.
Also, this site runs with PHP via Fast CGI, though served by nginx instead of PHP.