Nelly111s Posted April 9, 2021 Share Posted April 9, 2021 (edited) So, I'm continuing to try and install a test copy of CubeCart 6.4.2 on a Synology NAS. I had a few problems with connecting to the site after the initial setup, but these were sorted, see here Error on line 42. I've now run into the same error as @jrjdegrooton this thread Can't Login to Admin Panel. My site is hosted at http://192.168.1.56/shop/CubeCart/ so I've looked at that thread and inserted this into my global.inc file $glob['storeURL'] = 'http://192.168.1.56/shop/CubeCart'; $glob['standard_url'] = 'http://192.168.1.56/shop/CubeCart'; $glob['ssl_url'] = 'https://192.168.1.56/shop/CubeCart'; $glob['cookie_domain'] = '192.168.1.56'; $glob['rootRel'] = '/shop/CubeCart/'; // Must have trailing slash! >? Which, I think, is the same as the other thread. But no joy. It's not a username / password issue, it just goes back to the same admin logon screen with no error. I note that each time I try to login, the "logins" column in the table "admin_users" gets incremented by 1, so the dB thinks that I'm logging in. Can anyone offer any further insight? Edited April 9, 2021 by Nelly111s logins info added Quote Link to comment Share on other sites More sharing options...
bsmither Posted April 9, 2021 Share Posted April 9, 2021 Can you determine where PHP is keeping its "session" files? Can you view the storefront and keep something in the shopping basket? Quote Link to comment Share on other sites More sharing options...
Nelly111s Posted April 9, 2021 Author Share Posted April 9, 2021 Im not sure where the PHP session files are on this NAS - I'll do a bit of research and find out. I can view the storefront, but can't keep anything in the shopping basket. Quote Link to comment Share on other sites More sharing options...
Nelly111s Posted April 9, 2021 Author Share Posted April 9, 2021 I've found the session files in /var/services/tmp and located them via Terminal What next ... Quote Link to comment Share on other sites More sharing options...
bsmither Posted April 9, 2021 Share Posted April 9, 2021 For not being able to keep anything in the basket, the key reason is that PHP is not using, or can't get at, these session files. If the /setup/ folder is still present, within it is "info.php". Executing that file will show where and what session data is kept. If that isn't available, then looking directly at PHP's configuration file, PHP.INI, will also show this info. Quote Link to comment Share on other sites More sharing options...
Nelly111s Posted April 9, 2021 Author Share Posted April 9, 2021 The info.php is still there. Is this the information I need? Session Support enabled Registered save handlers files user Registered serializer handlers php_serialize php php_binary wddx Directive Local Value Master Value session.auto_start Off Off session.cache_expire 180 180 session.cache_limiter nocache nocache session.cookie_domain no value no value session.cookie_httponly 0 0 session.cookie_lifetime 0 0 session.cookie_path / / session.cookie_samesite no value no value session.cookie_secure 0 0 session.gc_divisor 1000 1000 session.gc_maxlifetime 1440 1440 session.gc_probability 1 1 session.lazy_write On On session.name PHPSESSID PHPSESSID session.referer_check no value no value session.save_handler files files session.save_path /var/services/tmp /var/services/tmp session.serialize_handler php php session.sid_bits_per_character 4 4 session.sid_length 32 32 session.upload_progress.cleanup On On session.upload_progress.enabled On On session.upload_progress.freq 1% 1% session.upload_progress.min_freq 1 1 session.upload_progress.name PHP_SESSION_UPLOAD_PROGRESS PHP_SESSION_UPLOAD_PROGRESS session.upload_progress.prefix upload_progress_ upload_progress_ session.use_cookies 1 1 session.use_only_cookies 0 0 session.use_strict_mode 0 0 session.use_trans_sid 0 0 Quote Link to comment Share on other sites More sharing options...
bsmither Posted April 9, 2021 Share Posted April 9, 2021 The next step is to see if there are any errors in the error log. You will probably need to allow PHP to create it: https://forums.cubecart.com/topic/51550-how-to-create-the-error-log/ Quote Link to comment Share on other sites More sharing options...
Nelly111s Posted April 9, 2021 Author Share Posted April 9, 2021 OK, thanks. Thats first on the list for tomorrow ! Quote Link to comment Share on other sites More sharing options...
Nelly111s Posted April 10, 2021 Author Share Posted April 10, 2021 OK, I created the ini-custom.inc.php file and put it in the root folder of the store. Tried to logon again, still no joy. I see that the CubeCart_sessions table is being populated - it creates entries when I try and logon. There was no error log created, either going into the normal store home page, or trying to logon to the admin page. Quote Link to comment Share on other sites More sharing options...
bsmither Posted April 10, 2021 Share Posted April 10, 2021 Using your browser's Developer Tools, when requesting any page from your site, examine the Network page of the tools to discern what cookie(s), if any, are being received from your site, and, more importantly, what is being sent back with the page request. Quote Link to comment Share on other sites More sharing options...
bsmither Posted April 10, 2021 Share Posted April 10, 2021 Can we assume you chose the Apache as the back-end web server for the NAS? My initial research on the Synology suggests this is a choice. Using nginx will require other measures to enact URL rewriting. Quote Link to comment Share on other sites More sharing options...
Nelly111s Posted April 11, 2021 Author Share Posted April 11, 2021 You're getting to the outer limits of my knowledge now (but don't stop, my limit is expanding) The image attached is the screenshot from the Network tab on Chrome developer tools. No obvious sign of cookies ... But as I said, I'm not 100% sure what I'm looking for. As far as Nginx or Apache, the Web control app in Synology says I'm using Apache 2.2 / php 7.3, but when I go into phpMyAdmin I get this Web server nginx/1.16.1 Database client version: libmysql - mysqlnd 5.0.12-dev - 20150407 - $Id: 7cc7cc96e675f6d72e5cf0f267f48e167c2abb23 $ PHP extension: mysqlihttp://192.168.1.56/phpMyAdmin/themes/dot.gif curlhttp://192.168.1.56/phpMyAdmin/themes/dot.gif mbstringhttp://192.168.1.56/phpMyAdmin/themes/dot.gif PHP version: 7.3.16 I've tried to find out how I can switch off Nginx (becasue it appears to be running ...) and I can't find the right info. Are there any resources that would be worth me having a read to improve my knowledge and chances of fixing this. It won't beat me! Quote Link to comment Share on other sites More sharing options...
bsmither Posted April 11, 2021 Share Posted April 11, 2021 See what happens when you click once on the second _g=login page request. This should highlight that line item and possibly show additional information - including all that what was requested and most of what was returned, including cookies. The same place where you found the session data, there will a table of SERVER variables. One of those should mention the name and version of the web server. Quote Link to comment Share on other sites More sharing options...
Nelly111s Posted April 11, 2021 Author Share Posted April 11, 2021 OK, so one of the cookies (the line highlighted) has this error "the set-cookie was blocked because its domain attribute was invalid". This was in the cookies tab. In the headers tab is this Server: nginx Set-Cookie: CC_421D0FD82C=ae45d98c88285d55836bc0da1eb8072f; expires=Sun, 18-Apr-2021 19:43:01 GMT; Max-Age=604800; path=/shop/CubeCart; domain=.192.168.1.56; HttpOnly So clearly, running nginx! I'm not sure how to stop it, but I'll have a look. Quote Link to comment Share on other sites More sharing options...
bsmither Posted April 11, 2021 Share Posted April 11, 2021 So, Chrome is being difficult. There is an issue (https://github.com/cubecart/v6/issues/2083) that mentions this. CubeCart HQ has put this at the bottom of the pile to be looked into. You may need to take these steps: 1. Configure the Synology to use Virtual Hosts, with a host that responds to 'www.nelly.home'. 2. On your computer, find the 'hosts' file and add an entry that points www.nelly.home to 192.168.1.56 Quote Link to comment Share on other sites More sharing options...
Nelly111s Posted April 11, 2021 Author Share Posted April 11, 2021 OK. Thanks. I'll try it in the morning - off to watch the close of the Masters now! Quote Link to comment Share on other sites More sharing options...
Nelly111s Posted April 12, 2021 Author Share Posted April 12, 2021 (edited) Well, I've got it going, but it's still not right. I created a virtual host (woodenstuff.home) and redirected 162.16.1.56 to it in the hosts file on my Mac. I thought I'd do a clean install since I'd created a new directory, so loaded the files up. Decided to use Firefox and it worked, sort of. When the installation script got to the end, it didn't create a new admin directory, nor give me the usual clickable link to any admin directory. It gave me a 504 Gateway Time-out error. I checked and the database tables had been created and I was able to login via the admin username/password dialog OK. I can also see the front page OK. This is also the same if I use Chrome and Safari, but I have to make sure I type the http://, not just woodenstuff.home/admin.php. It's clear that the permissions issues are still not sorted OK and I'd probably like to get to the bottom of this. However, "I think" that for what I currently need, which is developing a script and more work on the design of the site, it should work ... Here's what Firefox reported from the Store Overview page in CubeCart CubeCart Version 6.4.2 PHP Version (7.3 Recommended) 7.3.16 MySQL Version 5.5.5-10.3.24-MariaDB Image folder size 92.85 KB Download folder size 0.00 KB Max. Upload filesize 32M Browser user-agent Mozilla/5.0 (Macintosh; Intel Mac OS X 10.15; rv:88.0) Gecko/20100101 Firefox/88.0 Server Software Apache/2.2.34 (Unix) mod_fastcgi/mod_fastcgi-SNAP-0910052141 Edited April 12, 2021 by Nelly111s added information on versions 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.