After reinstalling my wamp environment this error message is showing on screen after I open app_dev.php:
Fatal error: Cannot redeclare class SessionHandlerInterface in C:...\app\cache\dev\classes.php on line 532
Does anyone have any clue what is going wrong?
I solved it clearing the cache:
app/console cache:clear
PHP version 5.4 introduced a new session management system based on an interface called SessionHandlerInterface
and it would seem that your Symfony2 code declares a class with the very same name in the global namespace, so there is a name clash.
Here are the docs: http://www.php.net/manual/en/class.sessionhandlerinterface.php
SessionHandlerInterface is an interface which defines a prototype for creating a custom session handler. In order to pass a custom session handler to session_set_save_handler() using its OOP invocation, the class must implement this interface.
The simple clear cache didn't work for me. It required that the production cache be cleared using the command below.
php app/console cache:clear --env=prod --no-debug
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With