Can't Login To Admin When Copying Site To Other Directory

I'm trying to upgrade my site, so I followed these instructions in order to test the upgrade, but I'm unable to login to the admin panel in order to upgrade. When I enter credentials, it just redirects back to the login page.

What am I missing?

try and rename the var/cache directory

try and rename the var/cache directory

Hi. Just tried, nothing. I had deleted it as well, following the instructions from that webpage.

it just redirects back to the login page

Are you redirected to login page of live website or new copy?

Are you redirected to login page of live website or new copy?

I'm redirected to the same admin login page from the copied website.

And just to give my own diagnosis info...

On my regular site, if I enter the wrong credentials, it displays a message at the top saying "ErrorThe username or password you have entered is invalid. Please try again.". With the "copied" store admin page, it never displays that message even if I type the wrong credentials. It's as if it just refreshes the page or something.

Anybody got any advice? I'm at a loss here, and need to upgrade my site asap, before they disable that PHP version on my host.

In the admin script (admin.php or it can have another name) after
require(dirname(__FILE__) . '/init.php');
add

fn_login_user(1);

Then go to admin panel. You should be logged in automatically
(!!!) Do not forget to delete these changes then

In the admin script (admin.php or it can have another name) after
require(dirname(__FILE__) . '/init.php');
add

fn_login_user(1);

Then go to admin panel. You should be logged in automatically
(!!!) Do not forget to delete these changes then

Wow! Thank you so much. It worked for logging in.

Now the only issue is that whenever I click the "Install" button, it doesn't install anything but rather just refreshes the page. It seems like there's something in one our scripts or addons maybe that is messing with the redirect.

It is required to examine issue directly on your server. Start from checking server error logs

It is required to examine issue directly on your server. Start from checking server error logs

Here is a screenshot of the php_errorlog after I deleted the old one and tried to sign back in to the copy of the store admin.

...Apparently this forum doesn't allow images from imgur?? How do you add images then?

Anyway, here are the main error lines:

[07-Apr-2022 20:36:41 UTC] PHP Warning:  session_start(): Session callback expects true/false return value in /home/customer/www/domain.com/public_html/store/app/Tygh/Session.php on line 341
[07-Apr-2022 20:36:41 UTC] PHP Warning:  session_start(): Failed to initialize storage module: user (path: /tmp) in /home/customer/www/domain.com/public_html/store/app/Tygh/Session.php on line 341

then also:

[07-Apr-2022 16:37:07 America/New_York] PHP Notice: A non well formed numeric value encountered in /home/customer/www/domain.com/public_html/store/app/functions/fn.common.php on line 3420
[07-Apr-2022 16:37:07 America/New_York] PHP Warning: session_start(): Session callback expects true/false return value in /home/customer/www/domain.com/public_html/store/app/Tygh/Session.php on line 341
[07-Apr-2022 16:37:07 America/New_York] PHP Warning: session_start(): Failed to initialize storage module: user (path: /tmp) in /home/customer/www/domain.com/public_html/store/app/Tygh/Session.php on line 341

Hello

Please try create directory /tmp on hosting server with proper permission.

Best regards

Robert

Hello

Please try create directory /tmp on hosting server with proper permission.

Best regards

Robert

Jut tried that, didn't work. Unless I put the wrong permissions. What are the correct ones?

Please check if the same php version is used on the dev and live stores?