Answers.Body: <p>The error was caused by the configuration in general.php, which works fine local and on three other websites.</p>
  
  <p>For production environment, I added </p>
  
  <pre><code>'userSessionDuration' =&gt; 'P101Y',
  'rememberedUserSessionDuration' =&gt; 'P101Y',
  'rememberUsernameDuration' =&gt; 'P101Y',
  'invalidLoginWindowDuration' =&gt; 'P101Y',
  </code></pre>
  
  <p>Now I removed it and can login in the cp - no idea why.</p>
  
Answers.ContentLicense: CC BY-SA 3.0
Answers.CreationDate: 2017-05-03T07:59:21.500Z
Answers.LastActivityDate: 2017-05-03T07:59:21.500Z
Answers.UserDisplayName: Sanbo
Body: <p>The website ist working, but I can not login in the control panel. </p>
  
  <p>In the console: </p>
  
  <pre><code>500 Internal Server Error - .../resources/lib/jquery-2.2.4.min.js?d=1493300895
  setcookie() expects parameter 3 to be integer, float given (/html/alte gerberei/craft/app/framework/web/CHttpRequest.php:1514)
  </code></pre>
  
  <p>... </p>
  
  <p>Has anybody an idea? Thanks in advance.</p>
  
Comments.ContentLicense: CC BY-SA 3.0
Comments.CreationDate: 2017-04-28T18:48:48.297Z
Comments.Text: If I visit the default Craft CP URL at http://ag.lovelybits.de/admin, I get the following Twig error: `Variable "entry" does not exist in "_layout" at line 23`.
  
  Screenshot: https://cl.ly/1F3v3e3I3721
Comments.UserDisplayName: Andrea DeMers
Comments.ContentLicense: CC BY-SA 3.0
Comments.CreationDate: 2017-04-28T19:18:50.407Z
Comments.Text: @AndreaDeMers they have a custom cp url, so naturally "admin" is just an entry(which doesn't exist) on their site. This error would not be related to their issue.
Comments.UserDisplayName: AbbeyDesign
Comments.ContentLicense: CC BY-SA 3.0
Comments.CreationDate: 2017-04-28T19:27:15.537Z
Comments.Text: @AbbeyDesign Indeed they do: http://ag.lovelybits.de/lovelyCP. If there is a custom CP URL, is it normal to get a Twig error when pointing to the default? Wouldn't a 404 make more sense?
Comments.UserDisplayName: Andrea DeMers
Comments.ContentLicense: CC BY-SA 3.0
Comments.CreationDate: 2017-04-28T19:32:00.037Z
Comments.Text: @AndreaDeMers well they've got other issues with their templates and how they are handling their 404's but I doubt it's related to their original problem. I suspect a bad upload of files or permissions. Something is not updated or missing.
Comments.UserDisplayName: AbbeyDesign
Comments.ContentLicense: CC BY-SA 3.0
Comments.CreationDate: 2017-04-28T22:22:04.813Z
Comments.Text: Try downloading a fresh copy of Craft from https://craftcms.com and replacing your existing `craft/app` folder with the fresh one and see if that helps.
Comments.UserDisplayName: Brad Bell
Comments.ContentLicense: CC BY-SA 3.0
Comments.CreationDate: 2017-04-30T08:42:50.333Z
Comments.Text: @BradBell I've remove the app folder and copy a new one, but the same issue.
Comments.UserDisplayName: Sanbo
Comments.ContentLicense: CC BY-SA 3.0
Comments.CreationDate: 2017-04-30T08:48:04.010Z
Comments.Text: @AndreaDeMers As AbbeyDesign mentioned, I have a custom cp url (lovelyCP). It is a early stage of development, but now you get a 404.
Comments.UserDisplayName: Sanbo
Tags: <control-panel><login>
Title: Can not login in the control panel: Internal Server Error 500
ThreadText: # Can not login in the control panel: Internal Server Error 500
  
  (Asked by: username_0 on 2017-04-28)
  
  The website ist working, but I can not login in the control panel.
  
  In the console:
  
  ```
  500 Internal Server Error - .../resources/lib/jquery-2.2.4.min.js?d=1493300895
  setcookie() expects parameter 3 to be integer, float given (/html/alte gerberei/craft/app/framework/web/CHttpRequest.php:1514)
  
  ```
  
  ...
  
  Has anybody an idea? Thanks in advance.
  
  **Tags:** control-panel, login
  
  > **Comments:**
  > **username_1**: If I visit the default Craft CP URL at http://ag.lovelybits.de/admin, I get the following Twig error: `Variable "entry" does not exist in "_layout" at line 23`.  Screenshot: https://cl.ly/1F3v3e3I3721  
  > **username_2**: @username_1 they have a custom cp url, so naturally "admin" is just an entry(which doesn't exist) on their site. This error would not be related to their issue.  
  > **username_1**: @username_2 Indeed they do: http://ag.lovelybits.de/lovelyCP. If there is a custom CP URL, is it normal to get a Twig error when pointing to the default? Wouldn't a 404 make more sense?  
  > **username_2**: @username_1 well they've got other issues with their templates and how they are handling their 404's but I doubt it's related to their original problem. I suspect a bad upload of files or permissions. Something is not updated or missing.  
  > **username_3**: Try downloading a fresh copy of Craft from https://craftcms.com and replacing your existing `craft/app` folder with the fresh one and see if that helps.  
  > **username_0**: @username_3 I've remove the app folder and copy a new one, but the same issue.  
  > **username_0**: @username_1 As username_2 mentioned, I have a custom cp url (lovelyCP). It is a early stage of development, but now you get a 404.  
  
  ---
  
  ## 1 answers
  
  ### Answer by username_0 on 2017-05-03. Score: 1 | Accepted answer
  
  The error was caused by the configuration in general.php, which works fine local and on three other websites.
  
  For production environment, I added
  
  ```
  'userSessionDuration' => 'P101Y',
  'rememberedUserSessionDuration' => 'P101Y',
  'rememberUsernameDuration' => 'P101Y',
  'invalidLoginWindowDuration' => 'P101Y',
  
  ```
  
  Now I removed it and can login in the cp - no idea why.
  
  
  ---
  
  