Help - Search - Members - Calendar
Full Version: store off
CubeCart Forums > CubeCart Version 3 > Installation & Upgrade Help (Version 3)
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
convict
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:

CODE
$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.
strawberryfusion
Hi,

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

rajiv

QUOTE(convict @ Oct 14 2006, 10:51 PM) *
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);
......
strawberryfusion
Hi,

I tried your suggestion with no luck. Many thanks.

rajiv
convict
QUOTE(strawberryfusion @ Oct 17 2006, 08:40 AM) *
Hi,

I tried your suggestion with no luck. Many thanks.

rajiv
Try following in CC 3.0.12 and older:
CODE
if($glob['rootRel']=="/"){
    $sessionName = "ccSID";
} else {
    $sessionName = "ccSID-".md5($glob['rootRel']);
}

session_name($sessionName);
@ini_set("session.cookie_path",$GLOBALS['rootRel']);
session_start();
strawberryfusion
Hi I tried the code you suggested at this post:

View Store Offline

admin/login.php
CODE
session_name($sessionName);
@ini_set("session.cookie_path",$GLOBALS['rootRel']);
session_start();
$_SESSION['ccAdminPath'] = $GLOBALS['rootRel'];


admin/includes/auth.inc.php
CODE
session_name($sessionName);
@ini_set("session.cookie_path",$GLOBALS['rootRel']);
session_start();


It works fine now - many thanks
rajiv biggrin.gif

QUOTE(convict @ Oct 18 2006, 06:00 PM) *
Try following in CC 3.0.12 and older:
CODE
if($glob['rootRel']=="/"){
    $sessionName = "ccSID";
} else {
    $sessionName = "ccSID-".md5($glob['rootRel']);
}

session_name($sessionName);
@ini_set("session.cookie_path",$glob['rootRel']);
session_start();
convict
Cool. I have edited original post because of $glob vs $GLOBALS smile.gif
This is a "lo-fi" version of our main content. To view the full version with more information, formatting and images, please click here.