# Problem with slim 3(Update Middleware from v2 to v3)

**URL:** <https://discourse.slimframework.com/t/problem-with-slim-3-update-middleware-from-v2-to-v3/1285>\
**Category:** Questions\
**Created:** [March 16, 2017, 8:38pm UTC](https://discourse.slimframework.com/t/problem-with-slim-3-update-middleware-from-v2-to-v3/1285 "2017-03-16T20:38:03Z")\
**Posts on this page:** 4\
**Page:** 1

<div class="post-metadata">

**Author:** ![SEGIO](https://avatars.discourse-cdn.com/v4/letter/s/e56c9b/32.png) [@SEGIO](https://discourse.slimframework.com/u/SEGIO)\
**Post date:** [March 16, 2017, 8:38pm UTC](https://discourse.slimframework.com/t/problem-with-slim-3-update-middleware-from-v2-to-v3/1285/1 "2017-03-16T20:38:03Z")

</div>

Hi all ,  
I have a problem when i upload my site with slim v2.5 and i get this error:  
“Error A website error has occurred. The website administrator has been notified of the issue. Sorry for the temporary inconvenience.”.  
After i use composer update to slim v3 and i get this error:  
“Fatal error: Uncaught Error: Class 'Slim\Middleware\SessionCookie”

i use this function:  
$builder = new CaptchaBuilder;  
$app-\>add(new \Slim\Middleware\SessionCookie(array(‘secret’ =\> ‘myappsecret’, ‘expires’ =\> ‘30 minutes’)));  
$app-\>add(new \Slim\Middleware\ContentTypes());

How i can update this function for Slim v3?

Thanks in advance

---

<div class="post-metadata">

**Author:** ![tflight](https://yyz2.discourse-cdn.com/flex030/user_avatar/discourse.slimframework.com/tflight/32/1205_2.png) [@tflight](https://discourse.slimframework.com/u/tflight)\
**Post date:** [March 17, 2017, 2:24pm UTC](https://discourse.slimframework.com/t/problem-with-slim-3-update-middleware-from-v2-to-v3/1285/2 "2017-03-17T14:24:08Z")

</div>

I don’t have any experience with Slim 2, but have you looked at the [Middleware Signature section of the upgrade guide](https://www.slimframework.com/docs/start/upgrade.html#middleware-signature) for Slim 3?

---

<div class="post-metadata">

**Author:** ![SEGIO](https://avatars.discourse-cdn.com/v4/letter/s/e56c9b/32.png) [@SEGIO](https://discourse.slimframework.com/u/SEGIO)\
**Post date:** [March 17, 2017, 7:28pm UTC](https://discourse.slimframework.com/t/problem-with-slim-3-update-middleware-from-v2-to-v3/1285/3 "2017-03-17T19:28:31Z")

</div>

Thank you for your answer,I try it and i get more errors in the next lines of my index.php.  
Also i try to use 3rd Middleware extension and i get always Class errors.

---

<div class="post-metadata">

**Author:** ![techmasti](https://avatars.discourse-cdn.com/v4/letter/t/8c91f0/32.png) [@techmasti](https://discourse.slimframework.com/u/techmasti)\
**Post date:** [March 18, 2017, 7:14am UTC](https://discourse.slimframework.com/t/problem-with-slim-3-update-middleware-from-v2-to-v3/1285/4 "2017-03-18T07:14:34Z")

</div>

This is nice informative read, thanks for share.  
[Mothers Day Quotes With Images](http://happymothersdayquote.com)
