Jump to content

store off


Guest strawberryfusion

Recommended Posts

Guest strawberryfusion

Hi, I've just uploaded a fresh install of CC v 3.0.12 and everything went fine as usual. I've not really tested anything except the 'store off' feature and this does not work. I've done a search and have found several posts regarding this. The one I thought would help referred to CC 3.0.8 I think but all the modified code is present in CC 3.0.12.

I've checked permissions and they are all correct. The only thing I noticed was when installing CC the persmissions displayed by CC were not correct when I manually checked them so I changed them to the correct permissions even though CC was saying they were correct?

I thought about it being a server issue but I have another store using the same server and the feature works OK. What would be wrong on the server for this feature not to work?

Just some more information - I got it to work by putting all the files into another directory. So maybe it's server thing?

Any help would be appreciated.

Many thanks

rajiv

Link to comment
Share on other sites

Try the simple thing in following files:

admin/login.php

admin/include/auth.inc.php

MOVE

$sessionDomain = substr($GLOBALS['rootRel'],0, strlen($GLOBALS['rootRel'])-1);

BELOW

session_name($sessionName);

Final result:

$sessionDomain = substr($GLOBALS['rootRel'],0, strlen($GLOBALS['rootRel'])-1);



if($glob['rootRel']=="/"){

	$sessionName = "ccSID";

} else {

	$sessionName = "ccSID-".md5($glob['rootRel']);

}



session_name($sessionName);

@ini_set("session.cookie_path",$sessionDomain);

session_start();

The original code makes strange things on some servers if store is installed in the site root folder - backend session cookie path is generated as /admin instead of / because of session_cookie path is called before session_name and parameter is empty. PHP generates current web folder as session cookie path.

It seems to be browser settings dependent issue for some reason too.

Link to comment
Share on other sites

Guest strawberryfusion

Hi,

Many thanks for your suggestion. I will give it a try and let you know.

rajiv

Try the simple thing in following files:

admin/login.php

admin/include/auth.inc.php

MOVE

$sessionDomain = substr($GLOBALS['rootRel'],0, strlen($GLOBALS['rootRel'])-1);

BELOW

session_name($sessionName);

......

Link to comment
Share on other sites

Hi,

I tried your suggestion with no luck. Many thanks.

rajiv

Try following in CC 3.0.12 and older:

if($glob['rootRel']=="/"){

	$sessionName = "ccSID";

} else {

	$sessionName = "ccSID-".md5($glob['rootRel']);

}



session_name($sessionName);

@ini_set("session.cookie_path",$GLOBALS['rootRel']);

session_start();

Edited by convict
Link to comment
Share on other sites

Guest strawberryfusion

Hi I tried the code you suggested at this post:

View Store Offline

admin/login.php

:sleep:

session_name($sessionName);

@ini_set("session.cookie_path",$GLOBALS['rootRel']);

session_start();

$_SESSION['ccAdminPath'] = $GLOBALS['rootRel'];




admin/includes/auth.inc.php


session_name($sessionName);

@ini_set("session.cookie_path",$GLOBALS['rootRel']);

session_start();




It works fine now - many thanks

rajiv  
Try following in CC 3.0.12 and older:

if($glob['rootRel']=="/"){

	$sessionName = "ccSID";

} else {

	$sessionName = "ccSID-".md5($glob['rootRel']);

}



session_name($sessionName);

@ini_set("session.cookie_path",$glob['rootRel']);

session_start();
Link to comment
Share on other sites

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.   Paste as plain text instead

  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...