Jump to content

Can't Login to Admin Panel

Recommended Posts

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 so I've looked at that thread and inserted this into my global.inc file 

$glob['storeURL'] = '';
$glob['standard_url'] = '';
$glob['ssl_url'] = '';
$glob['cookie_domain'] = '';
$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?


Link to comment
Share on other sites

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.


Link to comment
Share on other sites

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.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.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
Link to comment
Share on other sites

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.


Link to comment
Share on other sites

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.


Link to comment
Share on other sites

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.


Link to comment
Share on other sites

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

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!

Screenshot 2021-04-11 at 20.25.03.jpg

Link to comment
Share on other sites

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.

Link to comment
Share on other sites

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

  1. Server:
  2. Set-Cookie:
    CC_421D0FD82C=ae45d98c88285d55836bc0da1eb8072f; expires=Sun, 18-Apr-2021 19:43:01 GMT; Max-Age=604800; path=/shop/CubeCart; domain=.; HttpOnly
So clearly, running nginx! I'm not sure how to stop it, but I'll have a look.

Screenshot 2021-04-11 at 20.46.26.jpg

Link to comment
Share on other sites

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


Link to comment
Share on other sites

Well, I've got it going, but it's still not right. I created a virtual host (woodenstuff.home) and redirected 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
PHP Version (7.3 Recommended)
MySQL Version
Image folder size
92.85 KB
Download folder size
0.00 KB
Max. Upload filesize
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
Link to comment
Share on other sites


This topic is now archived and is closed to further replies.

  • Create New...