I never use PDO on my project, especially serialize and unserialize. But I got this error.
Fatal error: Class 'Symfony\Component\HttpKernel\Exception\FlattenException' not found in /var/www/test/mikroskil/mikroweb/vendor/symfony/symfony/src/Symfony/Component/HttpKernel/EventListener/ExceptionListener.php on line 56 Fatal error: Uncaught exception 'PDOException' with message 'You cannot serialize or unserialize PDO instances' in [no active file]:0 Stack trace: #0 [internal function]: PDO->__sleep() #1 [internal function]: session_write_close() #2 {main} thrown in [no active file] on line 0
it's so frustrating. Anybody can help me? It appears suddenly when i refresh my page.
Note : I have an error before. I use a form with POST method. And then i put a session on it. After that, i got this error.
failed to start the session: already started by php ($_session is set).
I tried to fix that error. But suddenly the page is showing this error
Fatal error: Class 'Symfony\Component\HttpKernel\Exception\FlattenException' not found in /var/www/test/mikroskil/mikroweb/vendor/symfony/symfony/src/Symfony/Component/HttpKernel/EventListener/ExceptionListener.php on line 56 Fatal error: Uncaught exception 'PDOException' with message 'You cannot serialize or unserialize PDO instances' in [no active file]:0 Stack trace: #0 [internal function]: PDO->__sleep() #1 [internal function]: session_write_close() #2 {main} thrown in [no active file] on line 0
I have found this answer. You just need to clear your Cookies on your browser. Maybe the previous error has been create a cookies and cannot replace it. i try to clear all my browser cookies and it successfull !
:)