Jump to content

Recommended Posts

I have a PHP calendar set up that functions using a CMS back-end system. I've installed it however I'm having problems with the login.

 

Quite often, after I have already logged in, I will go to do something e.g. edit an existing event, and it will suddenly ask me for my login again and then I have to start over.

 

Does any have any idea why this could be?

 

I'm fairly new to PHP so apologies if I'm being noobish!

Not exactly that though it does contain settings for creating a session. I'm afraid my knowledge of sessions and cookies via PHP is relatively poor.

 

I have attached the page which is the main admin page. If you could have a quick look at it that'd be awesome.

 

Thank you for your help :)

 

[attachment deleted by admin]

Your Sessions are being wiped

 

please note the code below

 

Line 10+

if(!is_writable(session_save_path()))session_save_path("/tmp");
session_start();
ob_start();
$__SESSION__=$HTTP_SESSION_VARS['__SESSION__'];
foreach($HTTP_POST_VARS as $k=>$v){
if(!is_array($v))${urldecode($k)}=urldecode($v);
}

 

Line: 82+

$page or $page = 'e';
if($page =="l"){
$HTTP_SESSION_VARS = array(); //This line will cause the problem
header("Location: index.php");
exit;
}

 

 

 

 

EDIT:

maybe try setting the Session to a var then setting them back after the call

ie

<?php
session_start();
$tmpSession = $_SESSION;
include "calander_admin_file.php";
$_SESSION = $tmpSession;
?>

Okay, I have figured out (almost) what I need to do. Apparently Ito fix the login loop I need to check the cookie and session save locations in the php.ini file.

 

However, I've never come across this before. How do I access it?

could be the same type of problem..

 

if you use only the CMS and don't have this problem then i would blame the other "plugins/addons"

 

the code for the calander looks out dated

for example

$HTTP_SESSION_VARS is the old way of setting sessions

 

i have created a revised version it may work..

 

it used the basic idea of the above code but takes into account the headers locations.

 

 

of couse an include could also mess it up!

 

backup your current file and remove the 2 from this file

 

[attachment deleted by admin]

This thread is more than a year old. Please don't revive it unless you have something important to add.

Join the conversation

You can post now and register later. If you have an account, sign in now to post with your account.

Guest
Reply to this topic...

×   Pasted as rich text.   Restore formatting

  Only 75 emoji are allowed.

×   Your link has been automatically embedded.   Display as a link instead

×   Your previous content has been restored.   Clear editor

×   You cannot paste images directly. Upload or insert images from URL.

×
×
  • Create New...

Important Information

We have placed cookies on your device to help make this website better. You can adjust your cookie settings, otherwise we'll assume you're okay to continue.