<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>

CC BY-SA 3.0
2017-05-03T07:59:21.500Z
2017-05-03T07:59:21.500Z
Sanbo
<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>

CC BY-SA 3.0
2017-04-28T18:48:48.297Z
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
Andrea DeMers
CC BY-SA 3.0
2017-04-28T19:18:50.407Z
@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.
AbbeyDesign
CC BY-SA 3.0
2017-04-28T19:27:15.537Z
@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?
Andrea DeMers
CC BY-SA 3.0
2017-04-28T19:32:00.037Z
@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.
AbbeyDesign
CC BY-SA 3.0
2017-04-28T22:22:04.813Z
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.
Brad Bell
CC BY-SA 3.0
2017-04-30T08:42:50.333Z
@BradBell I've remove the app folder and copy a new one, but the same issue.
Sanbo
CC BY-SA 3.0
2017-04-30T08:48:04.010Z
@AndreaDeMers As AbbeyDesign mentioned, I have a custom cp url (lovelyCP). It is a early stage of development, but now you get a 404.
Sanbo
<control-panel><login>
Can not login in the control panel: Internal Server Error 500
# 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**: @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.  
> **username_1**: @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?  
> **username_2**: @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.  
> **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**: @BradBell I've remove the app folder and copy a new one, but the same issue.  
> **username_0**: @AndreaDeMers As AbbeyDesign 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.


---

