Al Brookbanks Posted February 14, 2006 Share Posted February 14, 2006 It is broken in 3.0.8 because the session name in the front end doesn't match that of the backend. So open /admin/login.php, admin/logout.php and admin/includes/auth.inc.php Find:session_start(); Above this add: if($glob['rootRel']=="/"){ $sessionName = "ccSID"; } else { $sessionName = "ccSID-".md5($glob['rootRel']); } session_name($sessionName); Quote Link to comment Share on other sites More sharing options...
Guest walmarc Posted February 14, 2006 Share Posted February 14, 2006 It is broken in 3.0.8 because the session name in the front end doesn't match that of the backend. So open /admin/login.php, admin/logout.php and admin/includes/auth.inc.php Find:session_start(); Above this add: if($glob['rootRel']=="/"){ $sessionName = "ccSID"; } else { $sessionName = "ccSID-".md5($glob['rootRel']); } OK done that - here is what that section of auth.inc.php looks like: $sessionDomain = substr($GLOBALS['rootRel'],0, strlen($GLOBALS['rootRel'])-1); @ini_set("session.cookie_path",$sessionDomain); if($glob['rootRel']=="/"){ $sessionName = "ccSID"; } else { $sessionName = "ccSID-".md5($glob['rootRel']); } session_start(); Still get the offline store message when I access the site from the admin panel? :angry: Quote Link to comment Share on other sites More sharing options...
Guest JABevan Posted February 14, 2006 Share Posted February 14, 2006 This didn't seem to work for me either... Quote Link to comment Share on other sites More sharing options...
Guest RubySlipper Posted February 15, 2006 Share Posted February 15, 2006 Didn't work for me either. RS Quote Link to comment Share on other sites More sharing options...
Guest Posted February 15, 2006 Share Posted February 15, 2006 me fourth, didnt work.... you should check what was changed between 3.0.7 / 3.0.8 it worked in 3.0.7 - maybe its to do with what was changed. Quote Link to comment Share on other sites More sharing options...
Guest Posted February 15, 2006 Share Posted February 15, 2006 Ok guys, I found the problem. Brooky left off one line in the fix: session_name($sessionName); I've edited his post above to include that line. :D Quote Link to comment Share on other sites More sharing options...
Guest JABevan Posted February 16, 2006 Share Posted February 16, 2006 Looks great! Worked for me! Thanks, JAB* Quote Link to comment Share on other sites More sharing options...
Guest walmarc Posted February 16, 2006 Share Posted February 16, 2006 Looks great! Worked for me! Thanks, JAB* If I add: session_name($sessionName); I get a mostly greyed out left controlpanel + a Login screen. Up the top it says Logged in as: [Logout | Change Password] One of the few options is Admin sessions which doesn't work. I copied and pasted the total code three times to the same effect. As soon as I remove the line session_name($sessionName); - I can log in normally again (although the offline store option won't work). I'm using CC 3.0.8 in Firefox 1.5.0.1 Any ideas? :blink: Quote Link to comment Share on other sites More sharing options...
Al Brookbanks Posted February 16, 2006 Author Share Posted February 16, 2006 :blink: Sorry folks. Quote Link to comment Share on other sites More sharing options...
Guest pasher Posted February 21, 2006 Share Posted February 21, 2006 Just curious as to what 'Viewing Store Offline' is? Haven't noticed that anything is broken so maybe its something I've never tried yet? Pa Quote Link to comment Share on other sites More sharing options...
Guest reeko357 Posted February 21, 2006 Share Posted February 21, 2006 Just curious as to what 'Viewing Store Offline' is? Haven't noticed that anything is broken so maybe its something I've never tried yet? Pa Viewing the store offline allows you to, turn your store off to the public while allowing you or administrators, that are logged in, to continue to view the store. It's a handy option to have if your working on your store and you don't want the public using your store while you're in the process of modifying or upgrading. Quote Link to comment Share on other sites More sharing options...
Guest Posted February 23, 2006 Share Posted February 23, 2006 works a dream :w00t: Quote Link to comment Share on other sites More sharing options...
Guest Posted February 25, 2006 Share Posted February 25, 2006 I couldn't view store as admin, so i tried this, but now i get an error that says... Parse error: parse error, unexpected $ in /home/kylemc/public_html/shop/admin/includes/auth.inc.php on line 9 any help? thanks in advance! Quote Link to comment Share on other sites More sharing options...
Guest alarmed Posted February 26, 2006 Share Posted February 26, 2006 Hi i'm runing 3.09 and I can't get view offline to work when I enable ssl, is this only a problem with shared ssl cert? alarmed Quote Link to comment Share on other sites More sharing options...
Guest Posted February 26, 2006 Share Posted February 26, 2006 i doubt it has anything to do with that, cuz i don't have any SSL cert and i get the same problem :/ Quote Link to comment Share on other sites More sharing options...
Guest alarmed Posted February 26, 2006 Share Posted February 26, 2006 it works fine if I disable ssl!!!!! Quote Link to comment Share on other sites More sharing options...
Guest cpbooks2 Posted March 6, 2006 Share Posted March 6, 2006 I still cant get it to work, cant view store when store is offline. Ive tried all the codes maybe Im doing something wrong, any suggestions? Thanks! Quote Link to comment Share on other sites More sharing options...
Guest reeko357 Posted March 8, 2006 Share Posted March 8, 2006 i doubt it has anything to do with that, cuz i don't have any SSL cert and i get the same problem :/ I had that problem in 3.0.8 but it seems to be fixed in 3.0.9 Quote Link to comment Share on other sites More sharing options...
Guest chapter_two Posted April 4, 2006 Share Posted April 4, 2006 I had this problem in version 3.0.6. Upgraded to version 3.0.10 yesterday in the hope it would fix it .... but it hasn't. 3.0.10 files already have the code entered as the fix. Admin sessions is being populated when I login so I know that is working. Any ideas? I can't develop my store because I don't want it to be online whilst I do it. Quote Link to comment Share on other sites More sharing options...
Guest EverythingWeb Posted April 4, 2006 Share Posted April 4, 2006 Why not just put an index.html page with an 'Offline Message' and then in a .htaccess file put: DirectoryIndex index.html index.php ?? Quote Link to comment Share on other sites More sharing options...
Guest chapter_two Posted April 4, 2006 Share Posted April 4, 2006 Thanks for the suggestion. No need for the .htaccess file though as index.html always overrides index.php on my web server so I created a dummy index.html page as you suggested. Thanks again :o Quote Link to comment Share on other sites More sharing options...
Guest janpugs Posted August 22, 2006 Share Posted August 22, 2006 I put the codes in all 3 places , login.php, logout.php, and includes/auth.inc.php but I still can not veiw my store. I still get the "off line .php" Am I reading the instructions correctly? it says to copy and paste the codes "above" session_start () ; Is that right? Quote Link to comment Share on other sites More sharing options...
Guest Posted August 22, 2006 Share Posted August 22, 2006 This wasn't working for me in 3.0.10 but seems to be working ok now. Quote Link to comment Share on other sites More sharing options...
Guest airjer Posted August 27, 2006 Share Posted August 27, 2006 I see this above fix is edited into my files.... yet I can't view the store when it's offline. I'm using the latest Cube Cart version 3.0.12. Maybe it's the SSL as mentioned? Guess I'll just do the general index.html override.... ;) Quote Link to comment Share on other sites More sharing options...
burgensteen Posted August 27, 2006 Share Posted August 27, 2006 I see this above fix is edited into my files.... yet I can't view the store when it's offline. I'm using the latest Cube Cart version 3.0.12. Maybe it's the SSL as mentioned? Guess I'll just do the general index.html override.... I have noticed the same thing in 3.0.12 Burgensteen Quote Link to comment Share on other sites More sharing options...
Recommended Posts
Join the conversation
You can post now and register later. If you have an account, sign in now to post with your account.