Answers.Body: <p>That session path is related to cPanel with an Easy Apache install with multiple php binaries.</p>
  <p>For an error message to display that cPanel session path locally, there must be a session path hard-coded somewhere in the site config, perhaps in the .htaccess or a config file.</p>
  <p>I would try searching the local project files for a piece of that string, for example, &quot;ea-php72&quot;.</p>
  
Answers.ContentLicense: CC BY-SA 4.0
Answers.CreationDate: 2023-11-01T14:07:46.683Z
Answers.Text: That's it! I did a search in my project's files for "ea-php72" and there was a php.ini and a user.ini file both with 'session.save_path = "/var/cpanel/php/sessions/ea-php72"'. I renamed both files so they wouldn't be loaded and now the site works as expected. I guess the production server created these files. Thanks, @colonelclick !
Answers.UserDisplayName: Kirk Roberts
Answers.ContentLicense: CC BY-SA 4.0
Answers.CreationDate: 2023-10-31T16:25:20.597Z
Answers.LastActivityDate: 2023-11-03T19:52:20.437Z
Answers.LastEditDate: 2023-11-03T19:52:20.437Z
Answers.UserDisplayName: colonelclick
Body: <p>I am duplicating a Craft 3 site from a production environment to a dev environment (local with MAMP Pro). On the &quot;new&quot; 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.</p>
  <p>Then any attempts to access any site page (front end or back end) give the dev mode error screen with a PHP warning: <code>yii\base\ErrorException session_start(): open(/var/cpanel/php/sessions/ea-php72/sess_80tspb4u0b5129r9f87tlga18j, O_RDWR) failed: No such file or directory (2)</code></p>
  <p>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.</p>
  <p>In web.log there is <code>yii\base\Exception: No user session token exists.</code> I am not sure what other info might be helpful.</p>
  <p>I am feeling sheepish to ask such a question but I am struggling and need a pointer.</p>
  <p>Any ideas on what to try next?</p>
  
Comments.ContentLicense: CC BY-SA 4.0
Comments.CreationDate: 2023-10-31T09:45:24.213Z
Comments.Text: Have you tried removing cookies for the domain in your browser, or trying logging in using another browser?
Comments.UserDisplayName: Martin Spain
Comments.ContentLicense: CC BY-SA 4.0
Comments.CreationDate: 2023-11-01T01:57:28.907Z
Comments.Text: Try to delete the folder runtime under storage.
Comments.UserDisplayName: aodihis
Comments.ContentLicense: CC BY-SA 4.0
Comments.CreationDate: 2023-11-01T14:01:24.170Z
Comments.Text: @MartinSpain Thank you for those suggestions. I deleted the cookies and the result was that on page reload a new CraftSessionId was created, with the same session_start() error occurring. Same with another browser.
Comments.UserDisplayName: Kirk Roberts
Tags: <craft3><session>
Title: Session token error/missing after server switch
ThreadText: # Session token error/missing after server switch
  
  (Asked by: username_0 on 2023-10-30)
  
  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?
  
  **Tags:** craft3, session
  
  > **Comments:**
  > **username_1**: Have you tried removing cookies for the domain in your browser, or trying logging in using another browser?  
  > **username_2**: Try to delete the folder runtime under storage.  
  > **username_0**: @username_1 Thank you for those suggestions. I deleted the cookies and the result was that on page reload a new CraftSessionId was created, with the same session_start() error occurring. Same with another browser.  
  
  ---
  
  ## 1 answers
  
  ### Answer by username_3 on 2023-10-31. Score: 2 | Accepted answer
  
  That session path is related to cPanel with an Easy Apache install with multiple php binaries.
  
  For an error message to display that cPanel session path locally, there must be a session path hard-coded somewhere in the site config, perhaps in the .htaccess or a config file.
  
  I would try searching the local project files for a piece of that string, for example, "ea-php72".
  
  > **Comments:**
  > **username_0**: That's it! I did a search in my project's files for "ea-php72" and there was a php.ini and a user.ini file both with 'session.save_path = "/var/cpanel/php/sessions/ea-php72"'. I renamed both files so they wouldn't be loaded and now the site works as expected. I guess the production server created these files. Thanks, @username_3 !  
  
  ---
  
  