ozzyizzy Posted June 23, 2015 Share Posted June 23, 2015 Hi. So I thought I would upgrade to the latest V6.06 from V6.05 this morning. I did this through admin, and all seemed to go well. But then I was asked to check the configurations for my admin page and my store page. Both links went to my store home page rather than one to my admin page and the other to my store home page. When I type the link that my admin used to be at, I get redirected to my home page. I can access my admin via a bookmark, but it is not my renamed admin, although all my product etc does appear to be there. Also once I am in admin, it does not allow me to go to dashboard, but again takes me to my store homepage. What happened? Where to I change this? My includes/global.inc.php file is listing everything correct, but why can I not log in to my admin via my usual renamed admin file. I have everything backed up, but is seems I am missing something simple. Suggestions please. Quote Link to comment Share on other sites More sharing options...
Dirty Butter Posted June 23, 2015 Share Posted June 23, 2015 Try making a backup of your .htaccess file and then deleting it. CC will create another one that may work. Fingers crossed. Quote Link to comment Share on other sites More sharing options...
ozzyizzy Posted June 23, 2015 Author Share Posted June 23, 2015 nope.. made no difference. I can't even get to mysite.com/admin.php or the renamed admin file. Keeps going to my store homepage Quote Link to comment Share on other sites More sharing options...
Dirty Butter Posted June 24, 2015 Share Posted June 24, 2015 But then I was asked to check the configurations for my admin page and my store page. Was this because of an issue? Can you use a backup and get back online until CC support will be online tomorrow?? Quote Link to comment Share on other sites More sharing options...
ozzyizzy Posted June 24, 2015 Author Share Posted June 24, 2015 I don't think it was because of an issue. I remember the same page appearing after the last upgrade. It is basically a page showing the upgrade is 100% done, and the links to admin and homepage. The upgrade I did before took me to my admin once I clicked the admin link. This time they both take me to my home page. I could probably restore from backup. until later. Thanks for you help so far Dirty Butter. Quote Link to comment Share on other sites More sharing options...
bsmither Posted June 24, 2015 Share Posted June 24, 2015 Just to better understand:In your CC605, you renamed /admin.php to something else? You also edited /includes/global.inc.php so that this new name is assigned to $glob['adminFile']? Quote Link to comment Share on other sites More sharing options...
bsmither Posted June 24, 2015 Share Posted June 24, 2015 "I can access my admin via a bookmark" Huh? Quote Link to comment Share on other sites More sharing options...
ozzyizzy Posted June 24, 2015 Author Share Posted June 24, 2015 I renamed my admin file back when I had V6.04. And after the update from 6.04 to 6.05 everything was still where it was meant to be.( no problems at all) When I say I can access admin from bookmark I really mean history in the address bar. ie...https:// mysite.com/admin.php?_=g filemanager takes me to file manager in what appears to be my admin . All my products etc are there. I can move around in the admin everywhere apart from when I attempt to go to dashboard. Then it takes me to my store homepage. If I log out from admin, I get my admin login page, but when I attempt to log in it again takes me to my homepage. I am not sure what is going on. Quote Link to comment Share on other sites More sharing options...
bsmither Posted June 24, 2015 Share Posted June 24, 2015 Ok, we have narrowed it down to a problem where CubeCart 302 Redirects when attempting to show the Dashboard. And only the Dashboard. Which is what the admin is first shown after logging in.Having a place to go after logging in that is not the default location (the Dashboard) tells us a lot. So we just to find what it is about the Dashboard that faults out using a 302 Redirect, either to a page that doesn't exist (a hard-coded redirect to admin.php), or an empty URL (which is as if www.mystore.com/<nothing here, so index.php>.Does your hosting account have PHP's error logging turned on? Quote Link to comment Share on other sites More sharing options...
bsmither Posted June 24, 2015 Share Posted June 24, 2015 I'm not finding anything different between CC605 and CC606 in the dashboard controller code that would explain CC606's behavior. Quote Link to comment Share on other sites More sharing options...
bsmither Posted June 24, 2015 Share Posted June 24, 2015 I've expanded my comparison to the controllers files and the entire admin folder. Nothing obvious there. Quote Link to comment Share on other sites More sharing options...
ozzyizzy Posted June 24, 2015 Author Share Posted June 24, 2015 Not sure if php error logging is turned on on host. How can I tell? Quote Link to comment Share on other sites More sharing options...
bsmither Posted June 24, 2015 Share Posted June 24, 2015 Create a file named ini-custom.inc.php and save it in CubeCart's main folder. The contents are:<?php # Custom initialization commands # Filename: ini-custom.inc.php # File location: main CubeCart folder ini_set('memory_limit', '256M'); ini_set('max_execution_time', '60'); ini_set('error_log', 'error_log'); ini_set('log_errors', 'on'); ?>When you get bounced to the storefront out of admin, see if there is a new file, 'error_log', in the CubeCart's main folder. If so, let us know the contents. Quote Link to comment Share on other sites More sharing options...
ozzyizzy Posted June 24, 2015 Author Share Posted June 24, 2015 ok.. found error log. This is error being shown:[24-Jun-2015 08:24:56 Australia/Brisbane] PHP Parse error: syntax error, unexpected '$_smarty_tpl' (T_VARIABLE) in /home/knick830/public_html/cache/skin/7918baa6a1c892842db0458ffac62c541559ec0f_0.file.dashboard.index.php.php on line 103 Quote Link to comment Share on other sites More sharing options...
Dirty Butter Posted June 24, 2015 Share Posted June 24, 2015 6.0.6 has a new version of Smarty. Quote Link to comment Share on other sites More sharing options...
ozzyizzy Posted June 24, 2015 Author Share Posted June 24, 2015 this is what happened before the above error showed (loads of times) [24-Jun-2015 05:41:39 Australia/Brisbane] PHP Warning: filesize() [<a href='http://docs.php.net/manual/en/function.filesize.php'>function.filesize.php</a>]: stat failed for /home/knick830/public_html/cache/fccb1.sql.9256b4f503277cd95351ca80748b8ac2.cache in /home/knick830/public_html/classes/cache/file.class.php on line 168[24-Jun-2015 08:16:34 Australia/Brisbane] PHP Warning: fread() [<a href='http://docs.php.net/manual/en/function.fread.php'>function.fread.php</a>]: Length parameter must be greater than 0 in /home/knick830/public_html/ADMIN NAME/sources/maintenance.index.inc.php on line 237[24-Jun-2015 08:18:14 Australia/Brisbane] PHP Fatal error: Allowed memory size of 134217728 bytes exhausted (tried to allocate 186884643 bytes) in /home/knick830/public_html/ADMIN NAME/sources/maintenance.index.inc.php on line 237 Quote Link to comment Share on other sites More sharing options...
ozzyizzy Posted June 24, 2015 Author Share Posted June 24, 2015 (edited) Just did what you suggested bsmithers, and got the same error I previously mentioned. [24-Jun-2015 13:00:42 Australia/Brisbane] PHP Parse error: syntax error, unexpected '$_smarty_tpl' (T_VARIABLE) in /home/knick830/public_html/cache/skin/7918baa6a1c892842db0458ffac62c541559ec0f_0.file.dashboard.index.php.php on line 103 Edited June 24, 2015 by ozzyizzy error Quote Link to comment Share on other sites More sharing options...
bsmither Posted June 24, 2015 Share Posted June 24, 2015 Please visit the folder /cache/skin/ and delete all files you find in there. Quote Link to comment Share on other sites More sharing options...
bsmither Posted June 24, 2015 Share Posted June 24, 2015 If the error still persists, find the file:/cache/skins/long_string_of_hex_digits.file.dashboard.index.php.phpFind line 103 and reproduce it in your reply. Quote Link to comment Share on other sites More sharing options...
ozzyizzy Posted June 24, 2015 Author Share Posted June 24, 2015 ok.. So I deleted all the files in /cache/skins. Still not getting anywhere. When I access my admin through history and attempt to go to dashboard, still directed to homepage. All the files I deleted are back again. This is what line 103 shows:$foreach_$_smarty_tpl->tpl_vars['task']->value_Sav = $_smarty_tpl->tpl_vars[$_smarty_tpl->tpl_vars['task']->value]; Quote Link to comment Share on other sites More sharing options...
bsmither Posted June 24, 2015 Share Posted June 24, 2015 Hm. I don't know if a dollar sign is a legal character in the name of a variable, other than being the character that marks a sequence of letters as starting a variable.There is a change in the template code at exactly where this line is derived from.So, let's try this experiment. In the admin skin template file dashboard.index.php, near line 42:Find: {foreach from=$CUSTOM_QUICK_TASKS key=k item=task} Change to: {foreach $CUSTOM_QUICK_TASKS as $k => $task} This, $foreach_$_smarty_tpl->tpl_vars['task']->value_Sav, is new from other rendered templates in the cache folder. It may be a new aspect of the new version of Smarty being used in CC606.After making the above edit, delete all the files in the /cache/skins/ folder again. Try to view the Dashboard. Quote Link to comment Share on other sites More sharing options...
ozzyizzy Posted June 24, 2015 Author Share Posted June 24, 2015 Yeay.... That did it. Dashboard back where it should be. Logged out. Logged back in. Works like a charm. No idea what it all meant. But thank you for your brilliance!. Quote Link to comment Share on other sites More sharing options...
Al Brookbanks Posted June 24, 2015 Share Posted June 24, 2015 It sounds like your admin skin files haven't updated. Please either;1. Download 6.0.6 and upload the admin folder over your existing files.2. Implement the change in the top file of this commit (admin/skins/default/templates/dashboard.index.php): https://github.com/cubecart/v6/commit/84feb2d562471c9e69af323154e1b2c5aa3c2105 Quote Link to comment Share on other sites More sharing options...
Al Brookbanks Posted June 24, 2015 Share Posted June 24, 2015 Oh and empty the /cache folder too. Quote Link to comment Share on other sites More sharing options...
ozzyizzy Posted June 24, 2015 Author Share Posted June 24, 2015 Thank you Al. I uploaded admin folder over my own, and working fine. 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.