I am duplicating a Craft 3 site from a production environment to a dev environment (local with MAMP Pro). On the "new" dev site I can't log into the control panel. The credentials are valid but after getting the Craft spinner on the login screen it simply reloads.
Then any attempts to access any site page (front end or back end) give the dev mode error screen with a PHP warning:
yii\base\ErrorException session_start(): open(/var/cpanel/php/sessions/ea-php72/sess_80tspb4u0b5129r9f87tlga18j, O_RDWR) failed: No such file or directory (2)
This is odd because my MAMP is running PHP 8.0 for this host. Production is also running PHP 8 (not the 7.2 shown in the filepath). It makes me wonder if there is some setting I am missing. I have tried deleting rows in the sessions table, deleting items in the runtime folder, clearing caches before creating a new files/database transfer... no luck.
In web.log there is
yii\base\Exception: No user session token exists. I am not sure what other info might be helpful.
I am feeling sheepish to ask such a question but I am struggling and need a pointer.
Any ideas on what to try next?