Following the blog plugin, I have made a plugin similar to it. Everything seems to work fine except for some problems which I think is due to session.
In my index.php I have the following.
// Get the current page's owner
$page_owner = page_owner_entity();
if($page_owner === false || is_null($page_owner))
{
$page_owner = $_SESSION['user'];
set_page_owner($_SESSION['guid']);
}
I login as user1 then I go to my plugin's index page I had a system_message($_SESSION['user']->username) so I could see the current user's username, the username is correct. Logged out.
Then I login as user2 then I go again to my plugin's index page this time system_message($_SESSION['user']->username) output was user1's username.
Any help would be greatly appreciated.
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
- madkris@madkris
madkris - 0 likes
- Cash@costelloc
Cash - 0 likes
- madkris@madkris
madkris - 0 likes
- Brett@brett.profitt
Brett - 0 likes
- madkris@madkris
madkris - 0 likes
You must log in to post replies.Are you running php as a cgi process?
No idea on what cgi is, so I tried google, if I understood right then the answer to your question would be yes, I am using php.
You'd have to check your phpinfo to answer this because it is server specific.
I have xampp installed, im looking at my phpinfo, searched for words matching cgi.
Found this on the loaded modules under apache2handler section -> mod_cgi
Under Apache environment section i found this GATEWAY_INTERFACE CGI/1.1.
What should I be looking for?
You're looking for a line near the top that says "Server API." It's the 3rd one down for me.
On the 4th line I got, "Server API" with "Apache 2.0 Handler" on the righthand side.